[PATCH libinput 05/24] tools: Handle LIBINPUT_EVENT_POINTER_AXIS_FRAME in event-debug

Carlos Garnacho carlosg at gnome.org
Mon Apr 21 10:11:14 PDT 2014


This information has no coordinates itself, so only print out the event
time.

Signed-off-by: Carlos Garnacho <carlosg at gnome.org>
---
 tools/event-debug.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/tools/event-debug.c b/tools/event-debug.c
index c0a08a7..3a72bfa 100644
--- a/tools/event-debug.c
+++ b/tools/event-debug.c
@@ -199,6 +199,9 @@ print_event_header(struct libinput_event *ev)
 	case LIBINPUT_EVENT_POINTER_AXIS:
 		type = "POINTER_AXIS";
 		break;
+	case LIBINPUT_EVENT_POINTER_AXIS_FRAME:
+		type = "POINTER_AXIS_FRAME";
+		break;
 	case LIBINPUT_EVENT_TOUCH_DOWN:
 		type = "TOUCH_DOWN";
 		break;
@@ -318,6 +321,15 @@ print_axis_event(struct libinput_event *ev)
 }
 
 static void
+print_axis_frame_event(struct libinput_event *ev)
+{
+	struct libinput_event_pointer *p = libinput_event_get_pointer_event(ev);
+
+	print_event_time(libinput_event_pointer_get_time(p));
+	printf("\n");
+}
+
+static void
 print_touch_event_without_coords(struct libinput_event *ev)
 {
 	struct libinput_event_touch *t = libinput_event_get_touch_event(ev);
@@ -374,6 +386,9 @@ handle_and_print_events(struct libinput *li)
 		case LIBINPUT_EVENT_POINTER_AXIS:
 			print_axis_event(ev);
 			break;
+		case LIBINPUT_EVENT_POINTER_AXIS_FRAME:
+			print_axis_frame_event(ev);
+			break;
 		case LIBINPUT_EVENT_TOUCH_DOWN:
 			print_touch_event_with_coords(ev);
 			break;
-- 
1.9.0



More information about the wayland-devel mailing list