[gtk+/xi2] GdkDeviceManagerXI: Don't ignore core events so eagerly.
- From: Carlos Garnacho <carlosg src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+/xi2] GdkDeviceManagerXI: Don't ignore core events so eagerly.
- Date: Sun, 11 Oct 2009 01:13:50 +0000 (UTC)
commit b2a31afb84a09065a12b2efb1945cfc2ab3e6b18
Author: Carlos Garnacho <carlos gnome org>
Date: Sun Oct 11 01:22:34 2009 +0200
GdkDeviceManagerXI: Don't ignore core events so eagerly.
gdk/x11/gdkdevice-xi.h | 2 ++
gdk/x11/gdkdevicemanager-xi.c | 6 +++++-
2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gdk/x11/gdkdevice-xi.h b/gdk/x11/gdkdevice-xi.h
index e84535a..448f1fa 100644
--- a/gdk/x11/gdkdevice-xi.h
+++ b/gdk/x11/gdkdevice-xi.h
@@ -55,6 +55,8 @@ struct _GdkDeviceXI
/* Mask of buttons (used for button grabs) */
gint button_state;
+
+ guint in_proximity : 1;
};
struct _GdkDeviceXIClass
diff --git a/gdk/x11/gdkdevicemanager-xi.c b/gdk/x11/gdkdevicemanager-xi.c
index 79446cd..75fa1f1 100644
--- a/gdk/x11/gdkdevicemanager-xi.c
+++ b/gdk/x11/gdkdevicemanager-xi.c
@@ -546,9 +546,11 @@ gdk_device_manager_xi_translate_event (GdkEventTranslator *translator,
{
XDeviceMotionEvent *xdme = (XDeviceMotionEvent *) xevent;
- priv->ignore_core_events = TRUE;
event->motion.device = device;
+ if (device_xi->in_proximity)
+ priv->ignore_core_events = TRUE;
+
event->motion.x_root = (gdouble) xdme->x_root;
event->motion.y_root = (gdouble) xdme->y_root;
@@ -592,11 +594,13 @@ gdk_device_manager_xi_translate_event (GdkEventTranslator *translator,
if (xevent->type == device_xi->proximity_in_type)
{
event->proximity.type = GDK_PROXIMITY_IN;
+ device_xi->in_proximity = TRUE;
priv->ignore_core_events = TRUE;
}
else
{
event->proximity.type = GDK_PROXIMITY_OUT;
+ device_xi->in_proximity = FALSE;
priv->ignore_core_events = FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]