summaryrefslogtreecommitdiff
path: root/tools/libinput-debug-events.c
diff options
context:
space:
mode:
authorJosé Expósito <jose.exposito89@gmail.com>2021-05-27 19:19:38 +0200
committerPeter Hutterer <peter.hutterer@who-t.net>2021-06-09 01:18:58 +0000
commitb6b15fa30467c639983da0e22298913d6058b702 (patch)
treea1a4d6013d87dde7ea72f296d1600eae56176026 /tools/libinput-debug-events.c
parent781cee2d8bf7dae84d707df0ed99555ddd93b385 (diff)
downloadlibinput-b6b15fa30467c639983da0e22298913d6058b702.tar.gz
libinput: add hold gesture public API and tool support
Add hold gestures to the public API and the private functions to notify them. Also add hold gestures to debug-events and debug-gui. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Diffstat (limited to 'tools/libinput-debug-events.c')
-rw-r--r--tools/libinput-debug-events.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/libinput-debug-events.c b/tools/libinput-debug-events.c
index 358bca48..9ac2b0c6 100644
--- a/tools/libinput-debug-events.c
+++ b/tools/libinput-debug-events.c
@@ -119,6 +119,12 @@ print_event_header(struct libinput_event *ev)
case LIBINPUT_EVENT_GESTURE_PINCH_END:
type = "GESTURE_PINCH_END";
break;
+ case LIBINPUT_EVENT_GESTURE_HOLD_BEGIN:
+ type = "GESTURE_HOLD_BEGIN";
+ break;
+ case LIBINPUT_EVENT_GESTURE_HOLD_END:
+ type = "GESTURE_HOLD_END";
+ break;
case LIBINPUT_EVENT_TABLET_TOOL_AXIS:
type = "TABLET_TOOL_AXIS";
break;
@@ -657,7 +663,8 @@ print_gesture_event_without_coords(struct libinput_event *ev)
type = libinput_event_get_type(ev);
if (type == LIBINPUT_EVENT_GESTURE_SWIPE_END ||
- type == LIBINPUT_EVENT_GESTURE_PINCH_END)
+ type == LIBINPUT_EVENT_GESTURE_PINCH_END ||
+ type == LIBINPUT_EVENT_GESTURE_HOLD_END)
cancelled = libinput_event_gesture_get_cancelled(t);
print_event_time(libinput_event_gesture_get_time(t));
@@ -879,6 +886,12 @@ handle_and_print_events(struct libinput *li)
case LIBINPUT_EVENT_GESTURE_PINCH_END:
print_gesture_event_without_coords(ev);
break;
+ case LIBINPUT_EVENT_GESTURE_HOLD_BEGIN:
+ print_gesture_event_without_coords(ev);
+ break;
+ case LIBINPUT_EVENT_GESTURE_HOLD_END:
+ print_gesture_event_without_coords(ev);
+ break;
case LIBINPUT_EVENT_TABLET_TOOL_AXIS:
print_tablet_axis_event(ev);
break;