mirror of
https://github.com/lwouis/alt-tab-macos.git
synced 2026-05-24 11:20:36 +00:00
fix: only show standard windows of preview.app (closes #3351)
This commit is contained in:
@@ -87,7 +87,7 @@ extension AXUIElement {
|
||||
(
|
||||
books(runningApp) ||
|
||||
keynote(runningApp) ||
|
||||
preview(runningApp) ||
|
||||
preview(runningApp, subrole) ||
|
||||
iina(runningApp) ||
|
||||
openFlStudio(runningApp, title) ||
|
||||
crossoverWindow(runningApp, role, subrole, level) ||
|
||||
@@ -144,10 +144,10 @@ extension AXUIElement {
|
||||
return runningApp.bundleIdentifier == "com.apple.iWork.Keynote"
|
||||
}
|
||||
|
||||
private static func preview(_ runningApp: NSRunningApplication) -> Bool {
|
||||
private static func preview(_ runningApp: NSRunningApplication, _ subrole: String?) -> Bool {
|
||||
// when opening multiple documents at once with apple Preview,
|
||||
// one of the window will have level == 1 for some reason
|
||||
return runningApp.bundleIdentifier == "com.apple.Preview"
|
||||
return runningApp.bundleIdentifier == "com.apple.Preview" && [kAXStandardWindowSubrole, kAXDialogSubrole].contains(subrole)
|
||||
}
|
||||
|
||||
private static func openFlStudio(_ runningApp: NSRunningApplication, _ title: String?) -> Bool {
|
||||
|
||||
Reference in New Issue
Block a user