-
Notifications
You must be signed in to change notification settings - Fork 48
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
Doesn't work for Chrome PWA's #75
Comments
It seems that the AX API doesn't return a title for PWAs: However, the private API var cgWindowId: CGWindowID = 0
let windowIDStatus = _AXUIElementGetWindow(axWindow, &cgWindowId)
if windowIDStatus == .success && window.windowID == cgWindowId {
return axWindow
} The preview works well for PWAs. I think eventually there will be no choice but to use some private APIs for the critical operations that have no official replacement, such as getting a window ID and taking screenshots of windows in other spaces, etc. Refs: https://github.com/rxhanson/Rectangle/blob/main/Rectangle/TodoMode/TodoManager.swift#L160-L162 https://github.com/lwouis/alt-tab-macos/blob/master/src/logic/Window.swift#L233 |
@ShlomoCode thoughts on making this a PR? |
happily. The question is, after we use the window id is it still necessary to guess based on the size and position title, or can this part be removed? |
Maybe we can keep it as a fallback method, and just prioritize the private API usage? Though, I'm not sure which scenarios that method could possibly fail under. I'm not sure if a fallback is even needed, thoughts? |
It seems pretty stable, I've searched and haven't seen any complaints about it. |
Send in that PR :) |
findWindow using AXWindow Id (_AXUIElementGetWindow) closes ejbills#75
findWindow using AXWindow Id (_AXUIElementGetWindow) closes ejbills#75
findWindow (find windowRef (AX Window) by `SCWindow`) using `_AXUIElementGetWindow` closes ejbills#75
findWindow (find windowRef (AX Window) by `SCWindow`) using `_AXUIElementGetWindow` closes ejbills#75
@SABRE1982 @ShlomoCode what PWA was used as a reference for this? |
When hovering over icons for Chrome PWA's ("installed" web apps), no preview is shown. Chrome itself works, as well as most native apps.
The text was updated successfully, but these errors were encountered: