[gtk+/gtk-2-24] range: make condition consistent with GTK3
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24] range: make condition consistent with GTK3
- Date: Thu, 6 Sep 2012 16:04:46 +0000 (UTC)
commit 15999ec5f35fe7ef167bf6cfb14cfeb0fe9792d4
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu Sep 6 11:38:40 2012 -0400
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 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 5fcbef0..e94ea6e 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]