Skip to content

Commit

Permalink
fix: don't freeze when invoked while unity is recompiling (closes #342)
Browse files Browse the repository at this point in the history
Revert "fix: don't display invalid windows (may fix #292 #200)"

This reverts commit 1bca012
  • Loading branch information
lwouis committed May 21, 2020
1 parent bc26fa0 commit 41cb701
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
6 changes: 0 additions & 6 deletions src/logic/Windows.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,6 @@ class Windows {
}
}

// some window can get invalid *after* we add them to our list, but without us getting notified about it
// workaround: we remove the invalid windows right before showing the UI
static func removeWindowsWhichBecameInvalid() {
Windows.list.removeAll(where: { !$0.axUiElement.isActualWindow($0.application.runningApplication.bundleIdentifier) })
}

static func refreshIfWindowShouldBeShownToTheUser(_ window: Window, _ screen: NSScreen) {
window.shouldShowTheUser = !(!Preferences.showMinimizedWindows && window.isMinimized) &&
!(!Preferences.showHiddenWindows && window.isHidden) &&
Expand Down
1 change: 0 additions & 1 deletion src/ui/App.swift
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ class App: NSApplication, NSApplicationDelegate {
// TODO: find a way to update space index when windows are moved to another space, instead of on every trigger
Windows.updateSpaces()
let screen = Screen.preferred()
Windows.removeWindowsWhichBecameInvalid()
Windows.refreshWhichWindowsToShowTheUser(screen)
if (!Windows.list.contains { $0.shouldShowTheUser }) { hideUi(); return }
Windows.updateFocusedWindowIndex(0)
Expand Down

0 comments on commit 41cb701

Please sign in to comment.