mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-25 23:35:43 +00:00
fix(hud): restore hide and linux fallback
This commit is contained in:
+12
-5
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user