[nautilus/wip/corey/touch-double-click] list-base: Handle double click with touchscreen




commit ec2936643b1fe3110fdd42e40f0ea819c024f245
Author: Corey Berla <corey berla me>
Date:   Mon Oct 10 13:43:29 2022 -0700

    list-base: Handle double click with touchscreen
    
    We override the double click in nautilus-list-base but only
    have a case for GDK_BUTTON_PRIMARY.  If gtk_gesture_single_get_current_button()
    doesn't return a button, assume it's the pimary button.
    
    Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2538

 src/nautilus-list-base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/nautilus-list-base.c b/src/nautilus-list-base.c
index c1f85e6d1..3f484159d 100644
--- a/src/nautilus-list-base.c
+++ b/src/nautilus-list-base.c
@@ -395,7 +395,7 @@ on_item_click_pressed (GtkGestureClick *gesture,
 
     /* It's safe to claim event sequence on press in the following cases because
      * they don't interfere with touch scrolling. */
-    if (button == GDK_BUTTON_PRIMARY && n_press == 2 && !priv->single_click_mode)
+    if (button <= GDK_BUTTON_PRIMARY && n_press == 2 && !priv->single_click_mode)
     {
         /* If Ctrl + Shift are held, we don't want to activate selection. But
          * we still need to claim the event, otherwise GtkListBase's default


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