[gtk+] range: Bring back middle clicks



commit 2120ea60ed187deb3598fa0f291ed392c9f22909
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 75d4126..8539674 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -2023,9 +2023,9 @@ gtk_range_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
     }
   else if (priv->mouse_location == priv->trough_widget &&
            (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;
@@ -2054,9 +2054,9 @@ gtk_range_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
       update_slider_position (range, x, y);
     }
   else if (priv->mouse_location == priv->trough_widget &&
-           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]