[gtk+/xi2-playground: 4/12] GdkWindow: Make gdk_window_set_support_multidevice() enable touchpoints.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/xi2-playground: 4/12] GdkWindow: Make gdk_window_set_support_multidevice() enable touchpoints.
- Date: Tue, 15 Jun 2010 19:09:30 +0000 (UTC)
commit ba03404f42fcd1e228c5caa0dfce4008a2bfe364
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Jun 4 14:37:15 2010 +0200
GdkWindow: Make gdk_window_set_support_multidevice() enable touchpoints.
gdk/gdkwindow.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index eb73207..fd61225 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -10092,6 +10092,7 @@ gdk_window_set_support_multidevice (GdkWindow *window,
gboolean support_multidevice)
{
GdkWindowObject *private = (GdkWindowObject *) window;
+ GdkEventMask event_mask = 0;
g_return_if_fail (GDK_IS_WINDOW (window));
@@ -10103,6 +10104,12 @@ gdk_window_set_support_multidevice (GdkWindow *window,
private->support_multidevice = support_multidevice;
+ if (support_multidevice)
+ event_mask = gdk_window_get_events (window);
+
+ /* Enable events for slave touchscreen devices */
+ gdk_window_set_source_events (window, GDK_SOURCE_TOUCH, event_mask);
+
/* FIXME: What to do if called when some pointers are inside the window ? */
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]