[gtk+/gtk-3-22] range: Bring back middle clicks



commit 5b2cae6703d8a55e047ef2d830dbe80c392feac7
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Oct 11 14:07:53 2017 -0500

    range: Bring back middle clicks
    
    It does not hurt us to keep middle clicks doing the same
    as shift-primary clicks. This makes the transition from gtk2
    less painful in terms of muscle memory.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=787669

 gtk/gtkrange.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 98ec13b..eee45be 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -2741,9 +2741,9 @@ gtk_range_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
     }
   else if (priv->mouse_location == priv->trough_gadget &&
            (source == GDK_SOURCE_TOUCHSCREEN ||
-            (button == GDK_BUTTON_PRIMARY &&
-             ((primary_warps && !shift_pressed) ||
-              (!primary_warps && shift_pressed)))))
+            (primary_warps && !shift_pressed && button == GDK_BUTTON_PRIMARY) ||
+            (!primary_warps && shift_pressed && button == GDK_BUTTON_PRIMARY) ||
+            (!primary_warps && button == GDK_BUTTON_MIDDLE)))
     {
       /* warp to location */
       GdkRectangle slider;
@@ -2772,9 +2772,9 @@ gtk_range_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
       update_slider_position (range, x, y);
     }
   else if (priv->mouse_location == priv->trough_gadget &&
-           button == GDK_BUTTON_PRIMARY &&
-           ((primary_warps && shift_pressed) ||
-            (!primary_warps && !shift_pressed)))
+           ((primary_warps && shift_pressed && button == GDK_BUTTON_PRIMARY) ||
+            (!primary_warps && !shift_pressed && button == GDK_BUTTON_PRIMARY) ||
+            (primary_warps && button == GDK_BUTTON_MIDDLE)))
     {
       /* jump by pages */
       GtkScrollType scroll;


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