Give up focus when opening a tray menu

Closing the panel was not enough: SimpleTopBar stayed frontmost, so
Spotlight's search field never appeared. Deactivate the app when a tray
item is selected so transient panels can take focus, and allow a little
more time before the bar re-hides.

💘 Generated with Crush

Assisted-by: Crush:deepseek-v4.1-flash
This commit is contained in:
2026-09-27 10:30:20 +08:00
parent e465acba12
commit 8d795d0a28
4 changed files with 13 additions and 8 deletions
+2 -2
View File
@@ -142,8 +142,8 @@ preferred position controls where the hidden/kept boundary lands:
menu is its own window anchored at the item's on-screen spot, so it survives
re-hiding.
- `press` first calls `onWillPress`, which `AppDelegate` wires to close the
popover. Without it the panel stays open on top of the menu that opens and can
leave menus (e.g. Spotlight) stranded behind it.
popover **and** `NSApp.deactivate()`. Closing alone left our app frontmost, so
transient items (Spotlight's search field) still would not appear.
- **Cannot reveal a single icon.** The spacer hides a contiguous block to its
left, so a press can only reveal the whole block. Isolating one item would
need either per-item ordering control (not available) or covering the icons