tools/debug-events: ignore old-style pointer axis events completely
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 9 Sep 2024 05:30:05 +0000 (15:30 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Mon, 9 Sep 2024 05:41:45 +0000 (15:41 +1000)
Since they're interleaved with the more modern finger/wheel/continuous
events they mess up our repeate count, preventing compression for those
events.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1041>

tools/libinput-debug-events.c

index 6e92faee07173685ae1f5ca58f5308d456647f98..4200ba8d600dc80d9e1c45942d4e822263071ba6 100644 (file)
@@ -872,8 +872,12 @@ handle_and_print_events(struct libinput *li)
        while ((ev = libinput_get_event(li))) {
                enum libinput_event_type type = libinput_event_get_type(ev);
 
-               if (type != LIBINPUT_EVENT_POINTER_AXIS)
-                       print_event_header(ev);
+               if (type == LIBINPUT_EVENT_POINTER_AXIS) {
+                       libinput_event_destroy(ev);
+                       continue;
+               }
+
+               print_event_header(ev);
 
                switch (type) {
                case LIBINPUT_EVENT_NONE: