Skip to content

Commit

Permalink
fix: keynote was not showing while in slideshow mode (closes #636)
Browse files Browse the repository at this point in the history
  • Loading branch information
lwouis committed Oct 6, 2020
1 parent b408f14 commit ec7b69f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/api-wrappers/AXUIElement.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
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
isOnNormalLevel &&
([kAXStandardWindowSubrole, kAXDialogSubrole].contains(subrole) ||
Expand All @@ -91,7 +91,14 @@ extension AXUIElement {
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 {
// OpenBoard is a ported app which doesn't use standard macOS windows
return runningApp.bundleIdentifier == "org.oe-f.OpenBoard"
}

Expand Down

0 comments on commit ec7b69f

Please sign in to comment.