3

is there any way to get the pointer (mouse) coordinates in Wayland, AFAIK Wayland doesn't allow fetching pointer location outside the application window.

what about a daemon that tracks pointer coordinates for gestures.

I kinda want to make something like kde mouse gestures or easystroke(xorg) for gnome Wayland.

  • I think you need to look into the evdev program. For starters check out the urls here: https://en.wikipedia.org/wiki/Evdev. Also the sources to xev maybe instructive: https://github.com/practicalswift/osx/tree/master/src/x11apps/xev/xev-1.1.0. Xev should work in Wayland. –  Jul 06 '19 at 18:42
  • apparently i can't vote, but thanks, i guess that'd solve the problem. if I'm right it bypass the Wayland and directly reads input right? – zubin choudhary Jul 06 '19 at 18:50
  • Created the answer now. –  Jul 06 '19 at 18:59
  • [might this work?](https://gjs-docs.gnome.org/shell01~0.1_api/shell.global#method-get_pointer) – matanster May 08 '21 at 19:45

1 Answers1

1

I think you need to look into the evdev program, though its sources seem hard to find these days.

For starters check out the urls here: https://en.wikipedia.org/wiki/Evdev.

Also the sources to xev maybe instructive: https://github.com/freedesktop/xev and https://github.com/practicalswift/osx/tree/master/src/x11apps/xev/xev-1.1.0 . .

Xev should work in Wayland.