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

Getting the mouse position relative to the window #7

Open
wooster0 opened this issue Mar 17, 2021 · 1 comment
Open

Getting the mouse position relative to the window #7

wooster0 opened this issue Mar 17, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@wooster0
Copy link

Hello, this library looks pretty good. Mouse::get_position returns the mouse's global position anywhere on the screen. How about having a method for getting the mouse's position relative to the window?

@AltF02 AltF02 added the enhancement New feature or request label Mar 22, 2021
@AltF02 AltF02 self-assigned this Mar 22, 2021
@AltF02
Copy link
Owner

AltF02 commented Mar 22, 2021

Thanks for your suggestion 😄, I'll see if its possible to add this.

A problem would be selecting the preferred window, because that's usually handled by the application itself
Looks like its possible to move the mouse relative to window on X11, but idk about other platforms. I'll edit this post if I find a solution for windows/macos

Please take a look at this simple roadmap and tell if this is alright

Roadmap

  • Is it possible?
  • Linux
  • Windows
  • MacOS

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

No branches or pull requests

2 participants