Skip to content
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] add get current function for monitor and window #151

Open
decipher3114 opened this issue Aug 29, 2024 · 3 comments
Open

Comments

@decipher3114
Copy link

Add a function get_current() or get_active() for Monitor to get the Monitor with the mouse and Window which is active and focused.

@manfye
Copy link

manfye commented Sep 4, 2024

yeah agree, is ther eany function for such ?

@nashaofu
Copy link
Owner

Monitor::from_point(x, y) can retrieve the screen where the specified coordinates are located. Window::all() returns a list of windows sorted by the z-axis, and the z-axis value can be accessed through window.z(). Therefore, it is also possible to find a window using a coordinate point.

@decipher3114
Copy link
Author

But it will require an external method to get current mouse position. It would be great if all this is included in xcap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants