From e7d82e147863d90ae0f0744aa3b1ea2d8ecd79b6 Mon Sep 17 00:00:00 2001 From: Scott Lexium Date: Fri, 10 Apr 2026 12:09:37 +0100 Subject: [PATCH 1/2] fix: make HUD overlay and source selector follow across macOS Spaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both windows had alwaysOnTop but lacked setVisibleOnAllWorkspaces, so they stayed pinned to the Space they were first opened on. Users moving to a different virtual desktop would lose sight of the overlay. Calls setVisibleOnAllWorkspaces(true, { visibleOnFullScreen: true }) on macOS only — no-op on Windows/Linux so cross-platform behaviour is unchanged. --- electron/windows.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/electron/windows.ts b/electron/windows.ts index fb9a655..35a28b3 100644 --- a/electron/windows.ts +++ b/electron/windows.ts @@ -51,6 +51,12 @@ export function createHudOverlayWindow(): BrowserWindow { }, }); + // Follow the user across macOS Spaces (virtual desktops). + // Without this the HUD stays pinned to the Space it was first opened on. + if (process.platform === "darwin") { + win.setVisibleOnAllWorkspaces(true, { visibleOnFullScreen: true }); + } + win.webContents.on("did-finish-load", () => { win?.webContents.send("main-process-message", new Date().toLocaleString()); }); @@ -142,6 +148,12 @@ export function createSourceSelectorWindow(): BrowserWindow { }, }); + // Follow the user across macOS Spaces so the selector appears on the + // active desktop regardless of where the HUD was originally opened. + if (process.platform === "darwin") { + win.setVisibleOnAllWorkspaces(true, { visibleOnFullScreen: true }); + } + if (VITE_DEV_SERVER_URL) { win.loadURL(VITE_DEV_SERVER_URL + "?windowType=source-selector"); } else { From 0bde3594211a34fd91180bf9d632e80346c23a2f Mon Sep 17 00:00:00 2001 From: Scott Lexium Date: Fri, 10 Apr 2026 12:28:47 +0100 Subject: [PATCH 2/2] docs: add JSDoc comments to window factory functions --- electron/windows.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/electron/windows.ts b/electron/windows.ts index 35a28b3..dcd9f92 100644 --- a/electron/windows.ts +++ b/electron/windows.ts @@ -17,6 +17,11 @@ ipcMain.on("hud-overlay-hide", () => { } }); +/** + * Creates the always-on-top HUD overlay window centred at the bottom of the + * primary display. The window is frameless, transparent, and follows the user + * across macOS Spaces so it is never lost when switching virtual desktops. + */ export function createHudOverlayWindow(): BrowserWindow { const primaryDisplay = screen.getPrimaryDisplay(); const { workArea } = primaryDisplay; @@ -80,6 +85,10 @@ export function createHudOverlayWindow(): BrowserWindow { return win; } +/** + * Creates the main editor window. Starts maximised with a hidden title bar on + * macOS. This window is not always-on-top and appears in the taskbar/dock. + */ export function createEditorWindow(): BrowserWindow { const isMac = process.platform === "darwin"; @@ -126,6 +135,10 @@ export function createEditorWindow(): BrowserWindow { return win; } +/** + * Creates the floating source-selector window used to pick a screen or window + * to record. Frameless, transparent, and follows the user across macOS Spaces. + */ export function createSourceSelectorWindow(): BrowserWindow { const { width, height } = screen.getPrimaryDisplay().workAreaSize;