From ba82610c7d6aa4ebeaa83927b3bfd4aa92107946 Mon Sep 17 00:00:00 2001 From: Matt Dawkins Date: Fri, 11 Sep 2026 18:11:57 -0400 Subject: [PATCH] Keep the VIAME launcher window title after page loads --- client/platform/desktop/background.ts | 8 +++++++- docs/Dive-Desktop.md | 5 +++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/client/platform/desktop/background.ts b/client/platform/desktop/background.ts index 4fb8d2a13..148eaf913 100644 --- a/client/platform/desktop/background.ts +++ b/client/platform/desktop/background.ts @@ -221,12 +221,13 @@ async function createWindow() { try { const size = screen.getPrimaryDisplay().workAreaSize; const partitionSession = session.fromPartition('persist:dive'); + const launchedFromViame = Boolean(process.env.DIVE_VIAME_INSTALL_PATH); // Create the browser window. win = new BrowserWindow({ width: Math.min(size.width, 1420), height: Math.min(size.height - 200, 960), autoHideMenuBar: true, - title: 'VIAME DIVE Desktop', + title: launchedFromViame ? 'VIAME - DIVE Interface' : 'DIVE Desktop', webPreferences: { nodeIntegration: false, contextIsolation: true, @@ -238,6 +239,11 @@ async function createWindow() { }, }); + // desktop.html otherwise replaces the native title after every page load. + if (launchedFromViame) { + win.on('page-title-updated', (event) => event.preventDefault()); + } + listen((server) => { let address = server.address(); let port = 0; diff --git a/docs/Dive-Desktop.md b/docs/Dive-Desktop.md index f644852b1..2598f07c5 100644 --- a/docs/Dive-Desktop.md +++ b/docs/Dive-Desktop.md @@ -240,3 +240,8 @@ It's also helpful to look in the debug console. Press ++ctrl+shift+i++ to launc See [Interactive Annotation troubleshooting](Interactive-Annotation.md#troubleshooting). Verify the VIAME install path, confirm VIAME includes interactive service support, and check the debug console for subprocess errors (message: "Unable to load the interactive service"). ![Debugging Desktop](images/General/desktop-debug.png) + + +When started through the VIAME launch scripts (`DIVE_VIAME_INSTALL_PATH` is set), +the native window title is **VIAME - DIVE Interface**. Standalone launches use +**DIVE Desktop**.