[gtk+/gestures] widget: Flip execution order of GTK_PHASE_TARGET/BUBBLE



commit 3c72823c13bbca951eb68d647469c0cc835f2557
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu May 22 15:24:28 2014 +0200

    widget: Flip execution order of GTK_PHASE_TARGET/BUBBLE
    
    the "bubble" phase used to run before event handlers before GTK_PHASE_TARGET
    was added, in order to keep phases in the expected order, move GTK_PHASE_BUBBLE
    to be run (still invariably) after event handlers.
    
    The only behavioral change should be wrt widgets wanting mixed event handler/
    gesture handling, they could previously attach the gesture to the bubble phase
    and check for gtk_gesture_is_active() in the event handler to bail out, they'll
    have to use GTK_PHASE_CAPTURE for that purpose from now on.

 gtk/gtkwidget.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 20ee5ac..5bfd42c 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -7556,7 +7556,6 @@ gtk_widget_event_internal (GtkWidget *widget,
 
   g_object_ref (widget);
 
-  return_val |= _gtk_widget_run_controllers (widget, event, GTK_PHASE_BUBBLE);
   g_signal_emit (widget, widget_signals[EVENT], 0, event, &handled);
   return_val |= handled | !WIDGET_REALIZED_FOR_EVENT (widget, event);
   if (!return_val)
@@ -7670,6 +7669,8 @@ gtk_widget_event_internal (GtkWidget *widget,
   else
     return_val = TRUE;
 
+  return_val |= _gtk_widget_run_controllers (widget, event, GTK_PHASE_BUBBLE);
+
   g_object_unref (widget);
 
   return return_val;


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