[gtk/discrete-scroll] Don't keep discrete scroll events in the queue




commit 552267b93d2e02773edd2865846a79f70759d03b
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Dec 20 14:51:37 2021 -0500

    Don't keep discrete scroll events in the queue
    
    We are not going to compress those anyway.

 gdk/gdkevents.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index d0680e3696..e577c6b9c0 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]