How to get position of tablet pen relative to surfaces?

ferreiradaselva ferreiradaselva at protonmail.com
Sat May 12 22:20:39 UTC 2018


Nevermind, I found that there is an unstable protocol for tablets that provides that, so I will try it.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On May 12, 2018 7:04 PM, ferreiradaselva <ferreiradaselva at protonmail.com> wrote:

> 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
> `libinput_event_tablet_tool_get_y()`.
>
> 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
> docs:
>
> "...Clients don't know the global position of their surfaces..."
>
>> https://wayland.freedesktop.org/docs/html/ch04.html#sect-Protocol-Surface
>
> 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: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20180512/3b18d62a/attachment.html>


More information about the wayland-devel mailing list