range: make condition consistent with GTK3

cc7abf6a1c 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
This commit is contained in:
Cosimo Cecchi 2012-09-06 11:38:40 -04:00
parent 1c401ea913
commit 15999ec5f3

View File

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