diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-06-03 21:46:13 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-06-03 21:46:13 +0000 |
commit | fa37225a42db6e44b9290d868a656813cb79214b (patch) | |
tree | 3f581fa63e6daba412a94e82a46af82e8e65f2ce /gtk/gtklistitemwidget.c | |
parent | 78a06859b9701e4d3a091a53635a56d7a23bbe97 (diff) | |
parent | 510f7199755479e34e6dfa707db731625873ddf7 (diff) | |
download | gtk+-fa37225a42db6e44b9290d868a656813cb79214b.tar.gz |
Merge branch 'columnview-rubberbanding' into 'master'
columnview: Implement rubberbanding
See merge request GNOME/gtk!2008
Diffstat (limited to 'gtk/gtklistitemwidget.c')
-rw-r--r-- | gtk/gtklistitemwidget.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gtk/gtklistitemwidget.c b/gtk/gtklistitemwidget.c index 3057dac55d..2d71720c28 100644 --- a/gtk/gtklistitemwidget.c +++ b/gtk/gtklistitemwidget.c @@ -29,6 +29,7 @@ #include "gtkintl.h" #include "gtklistitemfactoryprivate.h" #include "gtklistitemprivate.h" +#include "gtklistbaseprivate.h" #include "gtkmain.h" #include "gtkselectionmodel.h" #include "gtkwidget.h" @@ -323,6 +324,8 @@ gtk_list_item_widget_click_gesture_pressed (GtkGestureClick *gesture, { GtkListItemWidgetPrivate *priv = gtk_list_item_widget_get_instance_private (self); GtkWidget *widget = GTK_WIDGET (self); + GtkWidget * parent = gtk_widget_get_parent (widget); + gboolean rubberband; if (priv->list_item && !priv->list_item->selectable && !priv->list_item->activatable) { @@ -330,7 +333,12 @@ gtk_list_item_widget_click_gesture_pressed (GtkGestureClick *gesture, return; } - if (!priv->list_item || priv->list_item->selectable) + if (GTK_IS_LIST_BASE (parent)) + rubberband = gtk_list_base_get_enable_rubberband (GTK_LIST_BASE (parent)); + else + rubberband = FALSE; + + if (!rubberband && (!priv->list_item || priv->list_item->selectable)) { GdkModifierType state; GdkEvent *event; |