[gtk+/overlay-heuristics: 4/8] x11: Make device timestamps work
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/overlay-heuristics: 4/8] x11: Make device timestamps work
- Date: Fri, 28 Nov 2014 19:30:02 +0000 (UTC)
commit ad8830815aedeb06d6f0fc23a1febab10e88dee5
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Nov 28 12:30:10 2014 -0500
x11: Make device timestamps work
We need to set the time of the event before associating the
device with it.
gdk/x11/gdkdevicemanager-core-x11.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gdk/x11/gdkdevicemanager-core-x11.c b/gdk/x11/gdkdevicemanager-core-x11.c
index db5543b..b9dfd51 100644
--- a/gdk/x11/gdkdevicemanager-core-x11.c
+++ b/gdk/x11/gdkdevicemanager-core-x11.c
@@ -595,6 +595,7 @@ gdk_x11_device_manager_core_translate_event (GdkEventTranslator *translator,
event->crossing.type = GDK_ENTER_NOTIFY;
event->crossing.window = window;
+ event->crossing.time = xevent->xcrossing.time;
gdk_event_set_device (event, device_manager->core_pointer);
/* If the subwindow field of the XEvent is non-NULL, then
@@ -605,7 +606,6 @@ gdk_x11_device_manager_core_translate_event (GdkEventTranslator *translator,
else
event->crossing.subwindow = NULL;
- event->crossing.time = xevent->xcrossing.time;
event->crossing.x = (gdouble) xevent->xcrossing.x / scale;
event->crossing.y = (gdouble) xevent->xcrossing.y / scale;
event->crossing.x_root = (gdouble) xevent->xcrossing.x_root / scale;
@@ -639,6 +639,7 @@ gdk_x11_device_manager_core_translate_event (GdkEventTranslator *translator,
event->crossing.type = GDK_LEAVE_NOTIFY;
event->crossing.window = window;
+ event->crossing.time = xevent->xcrossing.time;
gdk_event_set_device (event, device_manager->core_pointer);
/* If the subwindow field of the XEvent is non-NULL, then
@@ -649,7 +650,6 @@ gdk_x11_device_manager_core_translate_event (GdkEventTranslator *translator,
else
event->crossing.subwindow = NULL;
- event->crossing.time = xevent->xcrossing.time;
event->crossing.x = (gdouble) xevent->xcrossing.x / scale;
event->crossing.y = (gdouble) xevent->xcrossing.y / scale;
event->crossing.x_root = (gdouble) xevent->xcrossing.x_root / scale;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]