fix: keynote was not showing while in slideshow mode (closes #636)

This commit is contained in:
Louis Pontoise authored and lwouis committed 2020-10-07 02:10:30 +09:00
1 parent b408f14956
commit ec7b69f4fc
1 file changed
+8 -1
+8 -1
View File
@@ -75,7 +75,7 @@ extension AXUIElement {
// Some non-windows have cgWindowId == 0 (e.g. windows of apps starting at login with the checkbox "Hidden" checked) // Some non-windows have cgWindowId == 0 (e.g. windows of apps starting at login with the checkbox "Hidden" checked)
return wid != 0 && return wid != 0 &&
books(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
isOnNormalLevel && isOnNormalLevel &&
([kAXStandardWindowSubrole, kAXDialogSubrole].contains(subrole) || ([kAXStandardWindowSubrole, kAXDialogSubrole].contains(subrole) ||
@@ -91,7 +91,14 @@ extension AXUIElement {
drBetotte(runningApp))) drBetotte(runningApp)))
} }
private func keynote(_ runningApp: NSRunningApplication) -> Bool {
// 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
return runningApp.bundleIdentifier == "com.apple.iWork.Keynote"
}
private func openBoard(_ runningApp: NSRunningApplication) -> Bool { private func openBoard(_ runningApp: NSRunningApplication) -> Bool {
// OpenBoard is a ported app which doesn't use standard macOS windows
return runningApp.bundleIdentifier == "org.oe-f.OpenBoard" return runningApp.bundleIdentifier == "org.oe-f.OpenBoard"
} }