[gtk+/multitouch: 83/121] gdk: Update touch events to latest spec
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/multitouch: 83/121] gdk: Update touch events to latest spec
- Date: Thu, 12 Jan 2012 14:24:05 +0000 (UTC)
commit d043ea30eed2365175ef32942bdc0d049abd6d82
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Sep 18 09:46:38 2011 +0200
gdk: Update touch events to latest spec
gdk/x11/gdkdevice-xi2.c | 4 +---
gdk/x11/gdkdevicemanager-xi2.c | 19 ++++++-------------
2 files changed, 7 insertions(+), 16 deletions(-)
---
diff --git a/gdk/x11/gdkdevice-xi2.c b/gdk/x11/gdkdevice-xi2.c
index bd9cb2e..4a1ddb3 100644
--- a/gdk/x11/gdkdevice-xi2.c
+++ b/gdk/x11/gdkdevice-xi2.c
@@ -694,10 +694,8 @@ _gdk_x11_device_xi2_translate_event_mask (GdkEventMask event_mask,
if (event_mask & GDK_TOUCH_MASK)
{
XISetMask (mask, XI_TouchBegin);
- XISetMask (mask, XI_TouchMotion);
- XISetMask (mask, XI_TouchMotionUnowned);
+ XISetMask (mask, XI_TouchUpdate);
XISetMask (mask, XI_TouchEnd);
- XISetMask (mask, XI_TouchOwnership);
}
#endif /* XINPUT_2_1 */
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
index e30397a..c9c262f 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -876,8 +876,7 @@ get_event_window (GdkEventTranslator *translator,
case XI_ButtonRelease:
case XI_Motion:
#ifdef XINPUT_2_1
- case XI_TouchMotion:
- case XI_TouchMotionUnowned:
+ case XI_TouchUpdate:
case XI_TouchBegin:
case XI_TouchEnd:
#endif /* XINPUT_2_1 */
@@ -1143,9 +1142,10 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
else
{
#ifdef XINPUT_2_1
- if (ev->evtype == XI_TouchBegin ||
- ev->evtype == XI_TouchEnd)
- event->button.type = (ev->evtype == XI_TouchBegin) ? GDK_TOUCH_PRESS : GDK_TOUCH_RELEASE;
+ if (ev->evtype == XI_TouchBegin)
+ event->button.type = GDK_TOUCH_PRESS;
+ else if (ev->evtype == XI_TouchEnd)
+ event->button.type = GDK_TOUCH_RELEASE;
else
#endif /* XINPUT_2_1 */
event->button.type = (ev->evtype == XI_ButtonPress) ? GDK_BUTTON_PRESS : GDK_BUTTON_RELEASE;
@@ -1209,14 +1209,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
}
case XI_Motion:
#ifdef XINPUT_2_1
- case XI_TouchMotion:
- case XI_TouchMotionUnowned:
- /* FIXME: Unowned events should be rollback-able,
- * the easiest way to go could be just storing the
- * events so they can be replayed in arrival order
- * when an ownership event arrives, needs further
- * investigation though.
- */
+ case XI_TouchUpdate:
#endif /* XINPUT_2_1 */
{
XIDeviceEvent *xev = (XIDeviceEvent *) ev;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]