fix: remove jetbrain app non-windows (closes #885)
This commit is contained in:
1 parent
e630acffe0
commit
a368af3f01
1 file changed
+7
@@ -85,6 +85,7 @@ extension AXUIElement {
|
|||||||
(books(runningApp) || keynote(runningApp) || (
|
(books(runningApp) || keynote(runningApp) || (
|
||||||
// CGWindowLevel == .normalWindow helps filter out iStats Pro and other top-level pop-overs, and floating windows
|
// CGWindowLevel == .normalWindow helps filter out iStats Pro and other top-level pop-overs, and floating windows
|
||||||
level == AXUIElement.normalLevel &&
|
level == AXUIElement.normalLevel &&
|
||||||
|
jetbrainApp(runningApp, title) &&
|
||||||
([kAXStandardWindowSubrole, kAXDialogSubrole].contains(subrole) ||
|
([kAXStandardWindowSubrole, kAXDialogSubrole].contains(subrole) ||
|
||||||
openBoard(runningApp) ||
|
openBoard(runningApp) ||
|
||||||
adobeAudition(runningApp, subrole) ||
|
adobeAudition(runningApp, subrole) ||
|
||||||
@@ -99,6 +100,12 @@ extension AXUIElement {
|
|||||||
drBetotte(runningApp))))
|
drBetotte(runningApp))))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static func jetbrainApp(_ runningApp: NSRunningApplication, _ title: 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 || (title != nil && title != "")
|
||||||
|
}
|
||||||
|
|
||||||
private static func keynote(_ runningApp: NSRunningApplication) -> Bool {
|
private static func keynote(_ runningApp: NSRunningApplication) -> Bool {
|
||||||
// apple Keynote has a fake fullscreen window when in presentation mode
|
// apple Keynote has a fake fullscreen window when in presentation mode
|
||||||
// it covers the screen with a AXUnknown window instead of using standard fullscreen mode
|
// it covers the screen with a AXUnknown window instead of using standard fullscreen mode
|
||||||
|
|||||||
Reference in new issue
Block a user