diff --git a/src/api-wrappers/AXUIElement.swift b/src/api-wrappers/AXUIElement.swift index 959bb956..213186c2 100644 --- a/src/api-wrappers/AXUIElement.swift +++ b/src/api-wrappers/AXUIElement.swift @@ -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)