fix: better crossover windows detection

This commit is contained in:
Zachary Wander
2023-09-19 18:36:06 +02:00
committed by lwouis
parent 1a9f16a25a
commit 3f64463580
2 changed files with 1 additions and 2 deletions
+1 -1
View File
@@ -215,7 +215,7 @@ extension AXUIElement {
}
private static func crossoverWindow(_ runningApp: NSRunningApplication, _ role: String?, _ subrole: String?, _ level: CGWindowLevel) -> Bool {
return runningApp.bundleIdentifier == nil && role == kAXWindowRole && subrole == kAXUnknownSubrole && level == CGWindow.baseLevel
return runningApp.bundleIdentifier == nil && role == kAXWindowRole && subrole == kAXUnknownSubrole && level == CGWindow.normalLevel
&& (runningApp.localizedName == "wine64-preloader" || runningApp.executableURL?.absoluteString.contains("/winetemp-") ?? false)
}
-1
View File
@@ -4,7 +4,6 @@ typealias CGWindow = [CFString: Any]
extension CGWindow {
static let normalLevel = CGWindowLevelForKey(.normalWindow)
static let baseLevel = CGWindowLevelForKey(.baseWindow)
static let floatingWindow = CGWindowLevelForKey(.floatingWindow)
static func windows(_ option: CGWindowListOption) -> [CGWindow] {