[gtk+] Fix build with XI2.x for x < 2
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Fix build with XI2.x for x < 2
- Date: Thu, 1 Mar 2012 21:45:20 +0000 (UTC)
commit 352fdc214aafdc8fcf163746a483164fd372fa5d
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Mar 1 16:45:23 2012 -0500
Fix build with XI2.x for x < 2
gdk/x11/gdkdevicemanager-xi2.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
index 955b8fc..1f7c845 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -1240,8 +1240,10 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
event->scroll.state = _gdk_x11_device_xi2_translate_state (&xev->mods, &xev->buttons, &xev->group);
+#ifdef XINPUT_2_2
if (xev->flags & XIPointerEmulated)
_gdk_event_set_pointer_emulated (event, TRUE);
+#endif
}
else
{
@@ -1281,8 +1283,10 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
event->button.button = xev->detail;
}
+#ifdef XINPUT_2_2
if (xev->flags & XIPointerEmulated)
_gdk_event_set_pointer_emulated (event, TRUE);
+#endif
if (return_val == FALSE)
break;
@@ -1349,8 +1353,10 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
event->motion.state = _gdk_x11_device_xi2_translate_state (&xev->mods, &xev->buttons, &xev->group);
+#ifdef XINPUT_2_2
if (xev->flags & XIPointerEmulated)
_gdk_event_set_pointer_emulated (event, TRUE);
+#endif
/* There doesn't seem to be motion hints in XI */
event->motion.is_hint = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]