From 15999ec5f35fe7ef167bf6cfb14cfeb0fe9792d4 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Thu, 6 Sep 2012 11:38:40 -0400 Subject: [PATCH] range: make condition consistent with GTK3 cc7abf6a1cccd66a802c5272cd2ac6c944962c78 introduced the primary-button-warps-slider style property, but with a different condition check than the GTK3 counterpart. It turns out we really need to check for the mouse click location here, or we'll warp the slider to pointer also in case we clicked on the slider itself. https://bugzilla.gnome.org/show_bug.cgi?id=683512 --- gtk/gtkrange.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c index 5fcbef0332..e94ea6ec9c 100644 --- a/gtk/gtkrange.c +++ b/gtk/gtkrange.c @@ -2401,7 +2401,7 @@ gtk_range_button_press (GtkWidget *widget, * dragging the slider with a trough click using the warp button; * we warp the slider to mouse position, then begin the slider drag. */ - if (event->button == warp_button) + if (range->layout->mouse_location != MOUSE_SLIDER) { gdouble slider_low_value, slider_high_value, new_value;