Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

fix: make HUD overlay and source selector follow across macOS Spaces

Scott Lexiume7d82e147863
diff --git a/electron/windows.ts b/electron/windows.ts
index fb9a65531..35a28b39d 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 {