Skip to content

Commit

Permalink
cacheClosedWindowIfNeeded: make sure that the half-dead window that t…
Browse files Browse the repository at this point in the history
…riggered the cache renewal is also in the cache
  • Loading branch information
nikitabobko committed Dec 5, 2024
1 parent e67d37c commit f92dacb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/AppBundle/tree/frozen/closedWindowsCache.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import AppKit
import Common

/// First line of defence against lock screen
///
Expand Down Expand Up @@ -44,6 +45,7 @@ func cacheClosedWindowIfNeeded(window: Window) {
workspaces: Workspace.all.map { FrozenWorkspace($0) },
monitors: monitors.map(FrozenMonitor.init)
)
check(closedWindowsCache.windowIds.contains(window.windowId))
}

func restoreClosedWindowsCacheIfNeeded(newlyDetectedWindow: Window) -> Bool {
Expand Down

0 comments on commit f92dacb

Please sign in to comment.