mouse-rs icon indicating copy to clipboard operation
mouse-rs copied to clipboard

Getting the mouse position relative to the window

Open wooster0 opened this issue 3 years ago • 1 comments

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?

wooster0 avatar Mar 17 '21 15:03 wooster0

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

AltF02 avatar Mar 22 '21 06:03 AltF02