summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-01-12 14:40:27 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2016-01-15 10:07:05 +1000
commit3e6579998aa0fde1b802bd1d2c39634b3afcaf28 (patch)
tree0ff781cca5bdf64338cd4225ce088346c07674eb /tools
parentd5a07eb00b4f6c4aa404164d6dbbd981bf917141 (diff)
tools: get pressure/distance/tilt from a tip event too
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Jason Gerecke <jason.gerecke@wacom.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/event-gui.c4
1 files changed, 4 insertions, 0 deletions
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;