tools: only call libinput_dispatch() once per poll
authorPeter Hutterer <peter.hutterer@who-t.net>
Tue, 6 Oct 2020 05:04:08 +0000 (15:04 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 6 Oct 2020 06:12:17 +0000 (16:12 +1000)
This is a closer approximation of all callers anyway, and it makes it easier
to debug which events are handled per libinput_dispatch() call.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
tools/libinput-debug-events.c
tools/libinput-debug-gui.c
tools/libinput-debug-tablet.c

index 2921630f590d20b9ccedf15607f0ef3206fcac9a..433bfc87b25d22e881eda8ef498527e815900e3a 100644 (file)
@@ -917,7 +917,6 @@ handle_and_print_events(struct libinput *li)
                }
 
                libinput_event_destroy(ev);
-               libinput_dispatch(li);
                rc = 0;
        }
        return rc;
index 3d7df1b2f0469f2200c9bfdb07b5c925da6fb41d..70e41e16748c63c15af0b04909210d51fbf47644 100644 (file)
@@ -1487,7 +1487,6 @@ handle_event_libinput(GIOChannel *source, GIOCondition condition, gpointer data)
                }
 
                libinput_event_destroy(ev);
-               libinput_dispatch(li);
        }
        gtk_widget_queue_draw(w->area);
 
index 642f1e227c2e78b9255f94d03d39121dbeeb1f12..08d3e432e76bac9d6d19e28336b288e9d8a43ce8 100644 (file)
@@ -390,7 +390,6 @@ handle_libinput_events(struct context *ctx)
                }
 
                libinput_event_destroy(ev);
-               libinput_dispatch(li);
        }
 }