Don't keep discrete scroll events in the queue
authorMatthias Clasen <mclasen@redhat.com>
Mon, 20 Dec 2021 19:51:37 +0000 (14:51 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 20 Dec 2021 19:51:37 +0000 (14:51 -0500)
We are not going to compress those anyway.

gdk/gdkevents.c

index d0680e369623fff0de7b33d84f38023aa09bdb94..e577c6b9c0fc6953262050c7e627395d2d483d06 100644 (file)
@@ -522,7 +522,8 @@ _gdk_event_queue_find_first (GdkDisplay *display)
           if (pending_motion)
             return pending_motion;
 
-          if ((event->event_type == GDK_MOTION_NOTIFY || event->event_type == GDK_SCROLL) &&
+          if ((event->event_type == GDK_MOTION_NOTIFY ||
+               (event->event_type == GDK_SCROLL && gdk_scroll_event_get_direction (event) == GDK_SCROLL_SMOOTH)) &&
               (event->flags & GDK_EVENT_FLUSHED) == 0)
             pending_motion = tmp_list;
           else