[gtk+/multitouch: 25/27] gtk, scrolledwindow: Let GDK_SOURCE_MULTITOUCH devices do kinetic scrolling
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/multitouch: 25/27] gtk, scrolledwindow: Let GDK_SOURCE_MULTITOUCH devices do kinetic scrolling
- Date: Wed, 23 Nov 2011 23:12:33 +0000 (UTC)
commit 2ec24f6731f56271dc2a93bb4438b9e64bcfa5b8
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Nov 23 21:06:39 2011 +0100
gtk,scrolledwindow: Let GDK_SOURCE_MULTITOUCH devices do kinetic scrolling
gtk/gtkscrolledwindow.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 06be99f..2a6da82 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -502,8 +502,9 @@ gtk_scrolled_window_class_init (GtkScrolledWindowClass *class)
*
* Whether kinetic scrolling mode is enabled,
* only applies to devices with source %GDK_SOURCE_TOUCH
+ * or %GDK_SOURCE_MULTITOUCH.
*
- * Since: 3.4
+ * Since: 3.2
*/
g_object_class_install_property (gobject_class,
PROP_KINETIC_SCROLLING,
@@ -2545,7 +2546,8 @@ gtk_scrolled_window_button_release_event (GtkWidget *widget,
GtkWidget *child;
GdkEventButton *event;
- if (_event->type != GDK_BUTTON_RELEASE)
+ if (_event->type != GDK_BUTTON_RELEASE &&
+ _event->type != GDK_TOUCH_RELEASE)
return GTK_CAPTURED_EVENT_NONE;
event = (GdkEventButton *)_event;
@@ -2628,7 +2630,8 @@ gtk_scrolled_window_motion_notify_event (GtkWidget *widget,
gdouble dx, dy;
GdkEventMotion *event;
- if (_event->type != GDK_MOTION_NOTIFY)
+ if (_event->type != GDK_MOTION_NOTIFY &&
+ _event->type != GDK_TOUCH_MOTION)
return GTK_CAPTURED_EVENT_NONE;
event = (GdkEventMotion *)_event;
@@ -2729,13 +2732,15 @@ gtk_scrolled_window_button_press_event (GtkWidget *widget,
GdkInputSource source;
guint timeout;
- if (_event->type != GDK_BUTTON_PRESS)
+ if (_event->type != GDK_BUTTON_PRESS &&
+ _event->type != GDK_TOUCH_PRESS)
return GTK_CAPTURED_EVENT_NONE;
source_device = gdk_event_get_source_device (_event);
source = gdk_device_get_source (source_device);
- if (source != GDK_SOURCE_TOUCH)
+ if (source != GDK_SOURCE_TOUCH &&
+ source != GDK_SOURCE_MULTITOUCH)
return GTK_CAPTURED_EVENT_NONE;
event = (GdkEventButton *)_event;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]