By default, chromium-based apps will return kAXErrorNoValue for AXUIElementCopyAttributeValue(systemWideElement, kAXFocusedApplicationAttribute, ...). This prevents window gestures from working on Google Chrome and Electron apps such as Spotify.
In case of an error from AXUI, instead get the frontmost application from [NSWorkspace sharedWorkspace] and proceed with getForemostApp().
AXUIElementCopyAttributeValue could probably be replaced entirely, but I will leave it in case AXUIElementCopyAttributeValue is preferred in some cases.
By default, chromium-based apps will return
kAXErrorNoValue
forAXUIElementCopyAttributeValue(systemWideElement, kAXFocusedApplicationAttribute, ...)
. This prevents window gestures from working on Google Chrome and Electron apps such as Spotify.In case of an error from AXUI, instead get the frontmost application from
[NSWorkspace sharedWorkspace]
and proceed withgetForemostApp()
.AXUIElementCopyAttributeValue
could probably be replaced entirely, but I will leave it in caseAXUIElementCopyAttributeValue
is preferred in some cases.Fixes #19