fix: occasional crash when no there are no open window (closes #459)
This commit is contained in:
1 parent
a8970ddf71
commit
6df92da76f
1 file changed
+7
-6
@@ -116,12 +116,13 @@ class Windows {
|
||||
}
|
||||
|
||||
static func checkIfShortcutsShouldBeDisabled() {
|
||||
let activeWindow = list[0]
|
||||
App.app.shortcutsShouldBeDisabled =
|
||||
Preferences.disableShortcutsBlacklist.contains(activeWindow.application.runningApplication.bundleIdentifier ?? "") &&
|
||||
(!Preferences.disableShortcutsBlacklistOnlyFullscreen || activeWindow.isFullscreen)
|
||||
if App.app.shortcutsShouldBeDisabled && App.app.appIsBeingUsed {
|
||||
App.app.hideUi()
|
||||
if let activeWindow = list.first {
|
||||
App.app.shortcutsShouldBeDisabled =
|
||||
Preferences.disableShortcutsBlacklist.contains(activeWindow.application.runningApplication.bundleIdentifier ?? "") &&
|
||||
(!Preferences.disableShortcutsBlacklistOnlyFullscreen || activeWindow.isFullscreen)
|
||||
if App.app.shortcutsShouldBeDisabled && App.app.appIsBeingUsed {
|
||||
App.app.hideUi()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user