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 c88975169..3f8661260 100644 --- a/docs/Dive-Desktop.md +++ b/docs/Dive-Desktop.md @@ -256,6 +256,10 @@ See [Interactive Annotation troubleshooting](Interactive-Annotation.md#troublesh ![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**. + ## Desktop navigation While annotating a sequence, the top menu contains **Library**, **Jobs**,