From 9b85f005646976d272f902ddf3fed48bb04150e2 Mon Sep 17 00:00:00 2001 From: lwouis Date: Sun, 8 Dec 2024 22:30:46 +0100 Subject: [PATCH] feat: switcher will now show in "show desktop" mode (closes #783) --- src/ui/App.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/App.swift b/src/ui/App.swift index 180cc4c5..00fa91b0 100644 --- a/src/ui/App.swift +++ b/src/ui/App.swift @@ -232,7 +232,7 @@ class App: AppCenterApplication, NSApplicationDelegate { func focusSelectedWindow(_ selectedWindow: Window?) { guard appIsBeingUsed else { return } // already hidden hideUi(true) - if let window = selectedWindow, MissionControl.state() == .inactive { + if let window = selectedWindow, MissionControl.state() == .inactive || MissionControl.state() == .showDesktop { window.focus() if Preferences.cursorFollowFocusEnabled { moveCursorToSelectedWindow(window) @@ -285,7 +285,7 @@ class App: AppCenterApplication, NSApplicationDelegate { App.app.appIsBeingUsed = true if isFirstSummon || shortcutIndex != self.shortcutIndex { isFirstSummon = false - if Windows.list.count == 0 || MissionControl.state() != .inactive { hideUi(); return } + if Windows.list.count == 0 || MissionControl.state() == .showAllWindows || MissionControl.state() == .showFrontWindows { hideUi(); return } // TODO: can the CGS call inside detectTabbedWindows introduce latency when WindowServer is busy? Windows.detectTabbedWindows() // TODO: find a way to update space info when spaces are changed, instead of on every trigger