Close the panel when a tray item is selected
Selecting a tile opened the app's menu while SimpleTopBar's own panel
stayed on top of it, and could leave menus such as Spotlight stranded
behind it. Dismiss the panel first so the selected menu is unobstructed.
💘 Generated with Crush
Assisted-by: Crush:deepseek-v4.1-flash
This commit is contained in:
@@ -132,6 +132,14 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
)
|
||||
)
|
||||
self.popover = popover
|
||||
|
||||
// Selecting a tray item must dismiss our panel, otherwise it stays on
|
||||
// top of the menu that opens (and can strand menus behind it).
|
||||
Task { @MainActor [weak self] in
|
||||
MenuBarItemManager.shared.onWillPress = {
|
||||
self?.popover?.performClose(nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@objc private func togglePopover() {
|
||||
|
||||
Reference in New Issue
Block a user