From 6c770a61c0c2cf7fd4c24ba2f30be0789f9b6329 Mon Sep 17 00:00:00 2001 From: Tom McKnight Date: Fri, 18 Sep 2026 13:07:47 -0400 Subject: [PATCH] fix: show menubar popup over fullscreen Spaces on macOS On macOS the popup was created at normal window level, so clicking the tray icon from a fullscreen Space made macOS switch to a Desktop Space instead of drawing the window over the fullscreen app. Ordinary Desktop Spaces were unaffected, which is why this only ever reproduced against fullscreen apps. electron-menubar elevates the window unconditionally on Windows but gates it behind the keep-open-on-blur option elsewhere: if (process.platform === 'win32') win.setAlwaysOnTop(true, 'pop-up-menu'); else win.setAlwaysOnTop(keepOpen || browserWindow.alwaysOnTop === true); visibleOnFullScreen (which the library already sets) only grants the window fullScreenAuxiliary collection behavior, letting it join a fullscreen Space; a normal-level window still cannot render above one. Opting into alwaysOnTop supplies the missing window level, and the popup continues to hide on blur, so it floats only while it is open. Closes #563 --- src/main/config.test.ts | 4 ++++ src/main/config.ts | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/main/config.test.ts b/src/main/config.test.ts index 347f9311c..b8ff4557e 100644 --- a/src/main/config.test.ts +++ b/src/main/config.test.ts @@ -37,4 +37,8 @@ describe('main/config.ts', () => { expect(WindowConfig.webPreferences?.nodeIntegration).toBe(false); expect(WindowConfig.webPreferences?.backgroundThrottling).toBe(false); }); + + it('floats the window on macOS so it can draw over a fullscreen Space', () => { + expect(WindowConfig.alwaysOnTop).toBe(process.platform === 'darwin' ? true : undefined); + }); }); diff --git a/src/main/config.ts b/src/main/config.ts index 38b4036f0..7a9ff8d20 100644 --- a/src/main/config.ts +++ b/src/main/config.ts @@ -55,6 +55,8 @@ export const WindowConfig: BrowserWindowConstructorOptions = { ? { vibrancy: 'popover' as const, visualEffectState: 'active' as const, + /** Float the popup so it can draw over a fullscreen Space */ + alwaysOnTop: true, } : {}), /** Hide the app from the Windows taskbar */