[gtk+/touch-for-3.4] range: Only look at direct touches for now
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/touch-for-3.4] range: Only look at direct touches for now
- Date: Fri, 24 Feb 2012 20:15:08 +0000 (UTC)
commit 97f65c96941b4216f0ca23f90025d56ad832888d
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Feb 24 14:36:33 2012 -0500
range: Only look at direct touches for now
gtk/gtkrange.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index e68e7a5..cc3c9e2 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -2554,7 +2554,7 @@ gtk_range_button_press (GtkWidget *widget,
return TRUE;
}
- if (source != GDK_SOURCE_TOUCH &&
+ if (source != GDK_SOURCE_DIRECT_TOUCH &&
priv->mouse_location == MOUSE_TROUGH &&
event->button == GDK_BUTTON_PRIMARY)
{
@@ -2562,16 +2562,16 @@ gtk_range_button_press (GtkWidget *widget,
*/
GtkScrollType scroll;
gdouble click_value;
-
+
click_value = coord_to_value (range,
priv->orientation == GTK_ORIENTATION_VERTICAL ?
event->y : event->x);
priv->trough_click_forward = click_value > gtk_adjustment_get_value (priv->adjustment);
range_grab_add (range, device, MOUSE_TROUGH, event->button);
-
+
scroll = range_get_scroll_for_grab (range);
-
+
gtk_range_add_step_timer (range, scroll);
return TRUE;
@@ -2606,7 +2606,7 @@ gtk_range_button_press (GtkWidget *widget,
return TRUE;
}
else if ((priv->mouse_location == MOUSE_TROUGH &&
- (source == GDK_SOURCE_TOUCH || event->button == GDK_BUTTON_MIDDLE)) ||
+ (source == GDK_SOURCE_DIRECT_TOUCH || event->button == GDK_BUTTON_MIDDLE)) ||
priv->mouse_location == MOUSE_SLIDER)
{
gboolean need_value_update = FALSE;
@@ -2616,7 +2616,7 @@ gtk_range_button_press (GtkWidget *widget,
* On button 2 press and touch devices, we warp the slider to
* mouse position, then begin the slider drag.
*/
- if (event->button == GDK_BUTTON_MIDDLE || source == GDK_SOURCE_TOUCH)
+ if (event->button == GDK_BUTTON_MIDDLE || source == GDK_SOURCE_DIRECT_TOUCH)
{
gdouble slider_low_value, slider_high_value, new_value;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]