mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-18 08:00:08 +00:00
gtkwidget: Break early if non-gesture controllers handle the event
Non gesture controllers have no means to collaborate with other controllers, thus should be considered standalone entities. It makes no sense to propagate any further if scroll/key controllers handled the event.
This commit is contained in:
parent
695549d5a7
commit
d74ecfb02e
@ -5229,6 +5229,13 @@ _gtk_widget_run_controllers (GtkWidget *widget,
|
|||||||
|
|
||||||
if (controller_phase == phase)
|
if (controller_phase == phase)
|
||||||
handled |= gtk_event_controller_handle_event (data->controller, event);
|
handled |= gtk_event_controller_handle_event (data->controller, event);
|
||||||
|
|
||||||
|
/* Non-gesture controllers are basically unique entities not meant
|
||||||
|
* to collaborate with anything else. Break early if any such event
|
||||||
|
* controller handled the event.
|
||||||
|
*/
|
||||||
|
if (handled && !GTK_IS_GESTURE (data->controller))
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
l = next;
|
l = next;
|
||||||
|
Loading…
Reference in New Issue
Block a user