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.
This commit is contained in:
Carlos Garnacho 2014-05-22 15:24:28 +02:00
parent ca1510177c
commit 01d74f86a0

View File

@ -7557,7 +7557,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)
@ -7671,6 +7670,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;