From 0787b95960f37cb554d5cf5ffa40e4dddf634545 Mon Sep 17 00:00:00 2001 From: Rafael Araujo Lehmkuhl Date: Mon, 9 Mar 2026 14:47:47 -0300 Subject: [PATCH] electron: Re-set window title after page finishes loading On Windows the HTML document title could briefly override the Electron window title. Explicitly set it again in did-finish-load to ensure consistency. Closes #2373 --- src/electron/main.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/electron/main.ts b/src/electron/main.ts index 3f9f4db0ee..6cc555f232 100644 --- a/src/electron/main.ts +++ b/src/electron/main.ts @@ -58,6 +58,10 @@ function createWindow(): void { event.preventDefault() }) + mainWindow.webContents.on('did-finish-load', () => { + mainWindow?.setTitle(`Cockpit (${app.getVersion()})`) + }) + if (process.env.VITE_DEV_SERVER_URL) { mainWindow.loadURL(process.env.VITE_DEV_SERVER_URL) } else {