[gtk+/wip/garnacho/touchpad-gestures: 90/105] gtkwidget: Ensure touchpad events trigger the bubbling phase



commit e5e4eacda419e736f7ad048a8255f20a03b69653
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Jul 9 18:48:41 2015 +0200

    gtkwidget: Ensure touchpad events trigger the bubbling phase
    
    For all other events, we run the bubble phase deep in the specific
    ::motion/button-press/release/touch handlers.
    
    For touchpad events, it doesn't make sense to use GtkWidgetClass
    slots if the intended way to deal with these are gestures, so we
    run the bubble phase directly from gtk_widget_event_internal().

 gtk/gtkwidget.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 6609ec2..24ca50e 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -7717,6 +7717,10 @@ gtk_widget_event_internal (GtkWidget *widget,
 
       switch (event->type)
        {
+        case GDK_TOUCHPAD_SWIPE:
+        case GDK_TOUCHPAD_PINCH:
+          return_val |= _gtk_widget_run_controllers (widget, event, GTK_PHASE_BUBBLE);
+          /* Fall through */
        case GDK_EXPOSE:
        case GDK_NOTHING:
          signal_num = -1;



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