Fix activation policy being reapplied unnecessarily during app switching
This commit is contained in:
parent
e5e194de5f
commit
ba68ec429c
@ -10,8 +10,6 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool {
|
func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool {
|
||||||
menuBarManager?.applyActivationPolicy()
|
|
||||||
|
|
||||||
if !flag, let menuBarManager = menuBarManager, !menuBarManager.isMenuBarOnly {
|
if !flag, let menuBarManager = menuBarManager, !menuBarManager.isMenuBarOnly {
|
||||||
if WindowManager.shared.showMainWindow() != nil {
|
if WindowManager.shared.showMainWindow() != nil {
|
||||||
return false
|
return false
|
||||||
@ -20,10 +18,6 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func applicationDidBecomeActive(_ notification: Notification) {
|
|
||||||
menuBarManager?.applyActivationPolicy()
|
|
||||||
}
|
|
||||||
|
|
||||||
func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
|
func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user