mirror of
https://github.com/stablyai/orca.git
synced 2026-10-18 08:03:22 +00:00
Fix floating workspace needing two clicks after app switch (macOS) (#5128)
This commit is contained in:
@@ -147,6 +147,9 @@ describe('createMainWindow', () => {
|
||||
})
|
||||
)
|
||||
const browserWindowOptions = browserWindowMock.mock.calls[0]?.[0]
|
||||
// Why: macOS swallows the app-activating click unless the window accepts
|
||||
// first mouse, forcing a second click to focus the floating workspace.
|
||||
expect(browserWindowOptions.acceptFirstMouse).toBe(true)
|
||||
if (process.platform === 'darwin') {
|
||||
expect(browserWindowOptions).toMatchObject({
|
||||
titleBarStyle: 'hiddenInset'
|
||||
|
||||
@@ -230,6 +230,10 @@ export function createMainWindow(
|
||||
minHeight: MIN_HEIGHT,
|
||||
title: opts?.title ?? 'Orca',
|
||||
show: false,
|
||||
// Why: macOS swallows the app-activating click by default, so clicking
|
||||
// back into Orca (e.g. the floating workspace) needed a second click.
|
||||
// macOS-only option; Windows/Linux already deliver that click.
|
||||
acceptFirstMouse: true,
|
||||
// Why: on macOS the menu lives in the system menu bar, so the in-window
|
||||
// menu bar is irrelevant. On Windows/Linux we auto-hide so the menu bar
|
||||
// doesn't consume a dedicated row of vertical space on every launch —
|
||||
|
||||
Reference in New Issue
Block a user