fix: show vlc fullscreen video (closes #792)

This commit is contained in:
Louis Pontoise
2021-02-02 16:08:39 +09:00
committed by lwouis
parent 8d3063adfd
commit e675fab31c
+6
View File
@@ -92,6 +92,7 @@ extension AXUIElement {
worldOfWarcraft(runningApp, role) ||
battleNetBootstrapper(runningApp, role) ||
firefoxFullscreenVideo(runningApp, role) ||
vlcFullscreenVideo(runningApp, role) ||
androidEmulator(runningApp, title) ||
sanGuoShaAirWD(runningApp) ||
dvdFab(runningApp) ||
@@ -150,6 +151,11 @@ extension AXUIElement {
return (runningApp.bundleIdentifier?.hasPrefix("org.mozilla.firefox") ?? false) && role == kAXWindowRole
}
private func vlcFullscreenVideo(_ runningApp: NSRunningApplication, _ role: String?) -> Bool {
// VLC fullscreen video have subrole == AXUnknown if fullscreen'ed
return (runningApp.bundleIdentifier?.hasPrefix("org.videolan.vlc") ?? false) && role == kAXWindowRole
}
private func androidEmulator(_ runningApp: NSRunningApplication, _ title: String?) -> Bool {
// android emulator small vertical menu is a "window" with empty title; we exclude it
return title != "" && Applications.isAndroidEmulator(runningApp)