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
This commit is contained in:
Matthias Clasen
2017-10-11 14:07:53 -05:00
committed by Daniel Boles
parent ca4efb0080
commit 5b2cae6703

View File

@@ -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;