How to get position of tablet pen relative to surfaces?

ferreiradaselva ferreiradaselva at
Sat May 12 22:04:26 UTC 2018

I made a libinput context that I use to get the coordinates of the (wacom)
tablet pen with `libinput_event_tablet_tool_get_x()` and

Since libinput knows nothing of surfaces, the value is obviously the global
position of the pen. If I had the global position of the surface, I could
subtract the position of the pen relative to the surface, but according with the

"...Clients don't know the global position of their surfaces..."


Is there any way to solve this problem? I'm currently using `wl_surface` with
`xdg_surface` and `xdg_toplevel` roles.

Thanks in advance,

- Felipe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the wayland-devel mailing list