treeview: Don't handle clicks on any child widgets

We already skip them on the edited cell widget, but it's also a problem for
header buttons. Overall, there's no real reason to let it propagate here.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3996
This commit is contained in:
Alexander Mikhaylenko 2021-06-02 13:45:11 +05:00
parent 775dbec2e6
commit 80497debbb

View File

@ -2767,9 +2767,9 @@ gtk_tree_view_click_gesture_pressed (GtkGestureClick *gesture,
gboolean rtl;
GtkWidget *target;
/* check if this is a click in an editing widget */
/* check if this is a click in a child widget */
target = gtk_event_controller_get_target (GTK_EVENT_CONTROLLER (gesture));
if (priv->edited_column && gtk_widget_is_ancestor (target, widget))
if (gtk_widget_is_ancestor (target, widget))
return;
gtk_tree_view_stop_editing (tree_view, FALSE);