-
Notifications
You must be signed in to change notification settings - Fork 22
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
Feature request: getWindowAt #20
Comments
For Linux, it seems https://ewmh.readthedocs.io/en/latest/ewmh.html#ewmh.ewmh.EWMH.getClientListStacking I also saw someone say that XQueryTree gives list of windows in the stacking order. But I have not tested that claim. |
Hi! I think I get your point. You want the upper window at a given point, right? Then, we could create a new method called: getUpperWindowAt() (sorry for my english, perhaps there is a better word than "upper"). In such a case, order matters, so your implementation on Windows and Linux seems totally right (I have not tested getClientList vs. getClientListStacking performance, though I don't think there should be much difference). The problem will come, once again, on macOS. I didn't find any property or attribute which can be used to know the windows/apps stacking. Quartz returns the list of apps in "last to first focused" order, which in many cases may not match "upper". Given an app, it's possible to know its windows stack order, but unfortunately not for the app itself... Yes, I also love macOS... HAHAHAHA! I'm still out for some reasons and couldn't work on the module yet. If you agree, I will add this new method (including the constrains of macOS) as soon as I can!!! You can also clone or fork the project and work on a PR if you want to. Any contribution is more than welcome! |
Similar to
getWindowsAt
, but only returns the top window at position. It can also rely on faster implementation since it may not need to get all windows.For Windows, here's a snippet from https://github.com/Avasam/Auto-Split to quickly get the HWND at a coordinate
Microsoft documentation: https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-windowfrompoint
For other OSes... idk. I'm still trying to figure it out. I wouldn't mind starting with a naive implementation that reuses
getWindowsAt
The text was updated successfully, but these errors were encountered: