-
Notifications
You must be signed in to change notification settings - Fork 145
Open
Labels
Description
Is your feature request related to a problem? Please describe.
There is comment left in code and location method implementation that returns Err and prints error:
"You tried to get the mouse location. I don't know how this is possible under Wayland. Let me know if there is a new protocol"
Describe the solution you'd like
- Create transparent overlay surface.
- Listen for mouse events on that surface.
- If available - use virtual pointer protocol and move cursor by
(0, 0)(to ensure that we will get event). - Once mouse event received, you get mouse coordinates with it.
There is implementation of this tenchique: https://github.com/cjacker/wl-find-cursor/
Describe alternatives you've considered
Didn't see any alternatives (real protocols for getting cursor position).