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() {
|
static func checkIfShortcutsShouldBeDisabled() {
|
||||||
let activeWindow = list[0]
|
if let activeWindow = list.first {
|
||||||
App.app.shortcutsShouldBeDisabled =
|
App.app.shortcutsShouldBeDisabled =
|
||||||
Preferences.disableShortcutsBlacklist.contains(activeWindow.application.runningApplication.bundleIdentifier ?? "") &&
|
Preferences.disableShortcutsBlacklist.contains(activeWindow.application.runningApplication.bundleIdentifier ?? "") &&
|
||||||
(!Preferences.disableShortcutsBlacklistOnlyFullscreen || activeWindow.isFullscreen)
|
(!Preferences.disableShortcutsBlacklistOnlyFullscreen || activeWindow.isFullscreen)
|
||||||
if App.app.shortcutsShouldBeDisabled && App.app.appIsBeingUsed {
|
if App.app.shortcutsShouldBeDisabled && App.app.appIsBeingUsed {
|
||||||
App.app.hideUi()
|
App.app.hideUi()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user