-
Notifications
You must be signed in to change notification settings - Fork 593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
applicationElement & attributeValue has a delay for com.apple.WebKit.WebContent #3719
Comments
I guess also the local function startAppWatcher(app,appname,retry,nologging,force)
if not app or not appname then log.e('called startAppWatcher with no app') return end
if apps[appname] then return not nologging and log.df('app %s already registered',appname) end
+ if app:bundleID() == "com.apple.WebKit.WebContent" then log.df('app %s is com.apple.WebKit.WebContent',appname) return end
if app:kind()<0 or not windowfilter.isGuiApp(appname) then log.df('app %s has no GUI',appname) return end
if not fnutils.contains(axuielement.applicationElement(app):attributeNames() or {}, "AXFocusedWindow") then
log.df('app %s has no AXFocusedWindow element',appname)
return
end
[...] Credits to: @avegetablechicken #3712 |
I would open an PR for |
I use this workaround for dealing with WebContent: #2943 (comment) |
I seems a patch for window_filter.lua would be nice to have. and a special PR to add a filter for a bundleID? https://github.com/Hammerspoon/hammerspoon/blob/master/extensions/window/window_filter.lua#L103 |
Where:
hs.axuielement.applicationElement
hs.axuielement.applicationElementForPID
element:attributeValue()
where I see that the
attributeValue
takes the most time.with:
com.apple.WebKit.WebContent
I have an speedup with when I skip it:
Apps which have a WebContent:
My full Code:
The text was updated successfully, but these errors were encountered: