Skip to content

Commit

Permalink
resetClosedWindowsCache on every leftMouseUp
Browse files Browse the repository at this point in the history
Since we already have this callback, why not resetClosedWindowsCache
  • Loading branch information
nikitabobko committed Nov 27, 2024
1 parent 8124103 commit ba19c7c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/AppBundle/GlobalObserver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ class GlobalObserver {
nc.addObserver(forName: NSWorkspace.activeSpaceDidChangeNotification, object: nil, queue: .main, using: onNotif)
nc.addObserver(forName: NSWorkspace.didTerminateApplicationNotification, object: nil, queue: .main, using: onNotif)

NSEvent.addGlobalMonitorForEvents(matching: [.leftMouseUp]) { _ in
NSEvent.addGlobalMonitorForEvents(matching: [.leftMouseUp]) { _ in // todo reduce number of refreshSession
resetClosedWindowsCache()
resetManipulatedWithMouseIfPossible()
let mouseLocation = mouseLocation
let clickedMonitor = mouseLocation.monitorApproximation
Expand Down

0 comments on commit ba19c7c

Please sign in to comment.