From cea93cb9fd10e06620be376fb64ede6a9f0b3020 Mon Sep 17 00:00:00 2001 From: webadderall <131426131+webadderall@users.noreply.github.com> Date: Fri, 8 May 2026 10:31:33 +1000 Subject: [PATCH] fix(hud): restore hide and linux fallback --- electron/windows.ts | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/electron/windows.ts b/electron/windows.ts index f4d59b5d..c44642bb 100644 --- a/electron/windows.ts +++ b/electron/windows.ts @@ -305,12 +305,8 @@ ipcMain.on("hud-overlay-drag", (_event, phase: string, screenX: number, screenY: }); ipcMain.on("hud-overlay-hide", () => { - // Keep the HUD persistent: accidental hide events should not minimize it. if (hudOverlayWindow && !hudOverlayWindow.isDestroyed()) { - if (!hudOverlayWindow.isVisible()) { - hudOverlayWindow.show(); - } - hudOverlayWindow.moveTop(); + hudOverlayWindow.minimize(); } }); @@ -428,6 +424,17 @@ export function createHudOverlayWindow(): BrowserWindow { }, 1800); }); + // Safety net: on Linux the renderer may fail to fire did-finish-load + // (for example due to GPU/VAAPI startup issues). Show the window after + // ready-to-show as a fallback so the HUD still appears. + win.once("ready-to-show", () => { + setTimeout(() => { + if (!win.isDestroyed() && !win.isVisible()) { + showHudWindow(); + } + }, 500); + }); + const handleHudRendererReady = () => { if (!win.isDestroyed()) { showHudWindow();