Skip to content

fix: take focus for the full menu bar option on macOS 14 and later - #532

Merged
tieubao merged 2 commits into
developfrom
fix/fullscreen-full-bar
Nov 17, 2026
Merged

tieubao merged 2 commits into
developfrom
fix/fullscreen-full-bar

Conversation

@tieubao

@tieubao tieubao commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Why

"Use the full menu bar on expanding" never took focus on macOS 14 and later. Hidden Bar switched to a regular app but stayed inactive, so the front app's menus kept the bar. Refs #142.

What

  • On macOS 14+ the app takes the active state from the front app (NSRunningApplication.activate(from:options:)), with activate() as fallback. Older systems keep activate(ignoringOtherApps:).
  • The call sits behind a small seam (FullBarActivating) so a unit test covers both paths.

Checked

  • scripts/test.sh fresh derived data: Hidden Bar 677 passed, App Store 443 passed, 0 failed.
  • Negative control (swap the macOS 14+ call back): 2 tests go red, restore goes green.
  • macOS 27.0.1 VM, Developer ID signed build. Before: arrow click leaves Safari frontmost, activate() ignored. After: Hidden Bar is the front app, in windowed and full screen Safari; collapse hands focus back to Safari and Safari stays in full screen.
  • In a full screen Space the menu bar still draws Safari's menus while Hidden Bar is the active app; only the active state changes there.

activate(ignoringOtherApps:) is ignored under cooperative activation, so
the option switched to a regular app but never became the active one and the
front app's menus kept the bar. Use activate() from macOS 14, keep the old
call before it. The call sits behind a small seam so a unit test covers
both paths.
A plain activate() is ignored too under cooperative activation: on macOS
27.0.1 the full menu bar option stayed inactive after the arrow click. The
front app is now named as the one to take the active state from, with
activate() as the fallback. Checked in a macOS 27.0.1 VM: the arrow click
makes Hidden Bar the front app, in windowed and full screen Safari, and
collapse hands focus back.
@tieubao
tieubao force-pushed the fix/fullscreen-full-bar branch from 59b098a to 5eee1f8 Compare November 17, 2026 06:49
@tieubao
tieubao marked this pull request as ready for review November 17, 2026 06:50
@tieubao
tieubao merged commit 17e51c3 into develop Nov 17, 2026
3 checks passed
@tieubao
tieubao deleted the fix/fullscreen-full-bar branch November 17, 2026 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant