[PATCH libinput 1/7] tools: get pressure/distance/tilt from a tip event too
Peter Hutterer
peter.hutterer at who-t.net
Thu Jan 14 16:26:35 PST 2016
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
tools/event-gui.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/event-gui.c b/tools/event-gui.c
index a2691d9..636c28b 100644
--- a/tools/event-gui.c
+++ b/tools/event-gui.c
@@ -632,6 +632,10 @@ handle_event_tablet(struct libinput_event *ev, struct window *w)
case LIBINPUT_EVENT_TABLET_TOOL_TIP:
x = libinput_event_tablet_tool_get_x_transformed(t, w->width);
y = libinput_event_tablet_tool_get_y_transformed(t, w->height);
+ w->tool.pressure = libinput_event_tablet_tool_get_pressure(t);
+ w->tool.distance = libinput_event_tablet_tool_get_distance(t);
+ w->tool.tilt_x = libinput_event_tablet_tool_get_tilt_x(t);
+ w->tool.tilt_y = libinput_event_tablet_tool_get_tilt_y(t);
if (libinput_event_tablet_tool_get_tip_state(t) ==
LIBINPUT_TABLET_TOOL_TIP_DOWN) {
w->tool.x_down = x;
--
2.5.0
More information about the wayland-devel
mailing list