Hide stale off-screen windows of limited-AX apps
Some checks failed
CI / Build and test (ad-hoc signing) (push) Has been cancelled
Some checks failed
CI / Build and test (ad-hoc signing) (push) Has been cancelled
Some apps (for example a Java GUI toolkit) leave windows in the window list that claim the current Space but are not on screen. These stale buffer windows appeared as extra tabs. Add kCGWindowIsOnscreen and kCGWindowAlpha to the CGWindowList read and to the window dump. New filter rule: hide a no-AX window that is on the current Space and not on screen, unless it is minimized. A real window on the current Space is on screen. A real window on another Space is not on the current Space, so the rule keeps it (decision D4). Add WindowFilterTests for the stale, on-screen, and other-Space cases. All 34 tests pass with xcodebuild test.
This commit is contained in:
@@ -169,7 +169,7 @@ final class TrackingController {
|
||||
for r in result.debug {
|
||||
let b = r.bounds
|
||||
let boundsText = "(\(b.origin.x), \(b.origin.y), \(b.width), \(b.height))"
|
||||
lines.append("DUMP id=\(r.windowID) title=\(r.title) subrole=\(r.subrole ?? "nil") layer=\(r.layer) bounds=\(boundsText) spaces=\(r.spaceIDs) min=\(r.isMinimized) full=\(r.isFullScreen) shown=\(r.shown) reason=\(r.reason)")
|
||||
lines.append("DUMP id=\(r.windowID) title=\(r.title) subrole=\(r.subrole ?? "nil") layer=\(r.layer) bounds=\(boundsText) spaces=\(r.spaceIDs) onscreen=\(r.isOnscreen) alpha=\(r.alpha) min=\(r.isMinimized) full=\(r.isFullScreen) shown=\(r.shown) reason=\(r.reason)")
|
||||
}
|
||||
sections[index] = lines
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user