[gnome-shell/wip/pressure: 628/637] st-scroll-view: Throw away emulated pointer events



commit 85ae139ebd2217cde5a803a0c492aa4583e76e02
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sun Nov 4 10:11:30 2012 -0500

    st-scroll-view: Throw away emulated pointer events
    
    These are sent by the X server and have large deltas. They really
    should be filtered out by Clutter (or the X server) somehow, but we
    don't have the means to do that yet.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=687573

 src/st/st-scroll-view.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/st/st-scroll-view.c b/src/st/st-scroll-view.c
index e4b3372..caa627a 100644
--- a/src/st/st-scroll-view.c
+++ b/src/st/st-scroll-view.c
@@ -731,6 +731,9 @@ st_scroll_view_scroll_event (ClutterActor       *self,
   if (!priv->mouse_scroll)
     return FALSE;
 
+  /* throw away this garbage event. we want smooth scrolling. */
+  if (clutter_event_is_pointer_emulated ((ClutterEvent *) event))
+    return TRUE;
 
   switch (event->direction)
     {



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