Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions src/main/window/overlayWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,26 @@ function createOverlayWindow(): void {
},
})

// 'floating' + visibleOnFullScreen keeps the overlay above normal app
// windows AND visible over a fullscreen Chrome Space on macOS — the
// "am I done yet?" glance from another app is the core use case.
// 'floating' keeps the overlay above normal app windows; all-workspaces
// makes it follow the user across desktops/Spaces.
//
// skipTransformProcessType is LOAD-BEARING, and visibleOnFullScreen is
// deliberately ABSENT. The first shipped version passed
// `{ visibleOnFullScreen: true }`, and on macOS that makes Electron
// transform the ENTIRE APP's activation policy between
// ForegroundApplication and UIElementApplication (accessory/LSUIElement).
// Observed result: the Dock icon vanished (and app.dock.show() can't
// reliably restore it — electron#26350), the menu bar disappeared, and
// the MAIN window stopped behaving like a normal window (couldn't be
// moved/focused properly; see also electron#37487 for overlay windows
// corrupting app state via this transform). A status pip must never
// change what kind of app Agent Code is, so we skip the transform
// entirely (electron#27200). The trade: the overlay won't float above
// fullscreen (green-button) Spaces — acceptable; it still floats over
// normal windows on every desktop. Do NOT reintroduce
// visibleOnFullScreen without solving the process-transform side effect.
overlayWindow.setAlwaysOnTop(true, 'floating')
overlayWindow.setVisibleOnAllWorkspaces(true, { visibleOnFullScreen: true })
overlayWindow.setVisibleOnAllWorkspaces(true, { skipTransformProcessType: true })

overlayWindow.on('moved', () => {
if (!overlayWindow || overlayWindow.isDestroyed()) return
Expand Down