Fix activation policy being reapplied unnecessarily during app switching

This commit is contained in:
Beingpax 2025-11-08 20:11:37 +05:45
parent e5e194de5f
commit ba68ec429c
2 changed files with 2 additions and 8 deletions

View File

@ -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
} }