From e2d26f2abce57ba2aab426ca836f700da743e9ff Mon Sep 17 00:00:00 2001 From: Zachary Wander Date: Mon, 8 Nov 2021 01:27:22 +0900 Subject: [PATCH] fix: display all windows from android studio --- src/api-wrappers/AXUIElement.swift | 2 +- src/logic/Application.swift | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/api-wrappers/AXUIElement.swift b/src/api-wrappers/AXUIElement.swift index 8f20fff8..d5715383 100644 --- a/src/api-wrappers/AXUIElement.swift +++ b/src/api-wrappers/AXUIElement.swift @@ -103,7 +103,7 @@ extension AXUIElement { private static func jetbrainApp(_ runningApp: NSRunningApplication, _ title: String?, _ subrole: String?) -> Bool { // jetbrain apps sometimes generate non-windows that pass all checks in isActualWindow // they have no title, so we can filter them out based on that - return runningApp.bundleIdentifier?.range(of: "^com\\.jetbrains\\..+?$", options: .regularExpression) == nil || + return runningApp.bundleIdentifier?.range(of: "^com\\.(jetbrains\\.|google\\.android\\.studio).+?$", options: .regularExpression) == nil || (subrole == kAXStandardWindowSubrole || title != nil && title != "") } diff --git a/src/logic/Application.swift b/src/logic/Application.swift index 22edd11c..a62f04a7 100644 --- a/src/logic/Application.swift +++ b/src/logic/Application.swift @@ -31,8 +31,7 @@ class Application: NSObject { if app.bundleIdentifier == "edu.stanford.protege" || app.bundleIdentifier?.range(of: "^com\\.install4j\\..+?$", options: .regularExpression) != nil || app.bundleIdentifier?.range(of: "^com\\.live2d\\.cubism\\..+?$", options: .regularExpression) != nil || - app.bundleIdentifier?.range(of: "^com\\.jetbrains\\..+?$", options: .regularExpression) != nil || - app.bundleIdentifier?.range(of: "^com\\.google\\.android\\.studio.*?$", options: .regularExpression) != nil { + app.bundleIdentifier?.range(of: "^com\\.(jetbrains\\.|google\\.android\\.studio).+?$", options: .regularExpression) != nil { return n.filter { $0 != kAXFocusedUIElementChangedNotification } } return n