From 98e3e5e50f9c51b7915af2adeef23af9831a6195 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Thu, 27 Feb 2014 23:45:49 +0100 Subject: [PATCH] Partially revert 5c99eae8a9ca04f5e89e60a314d3e19c7ef0a715 We must extract the window from XIDeviceEvent, to be able to apply our workaround to spoof the event in compositor.c --- src/core/display.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/core/display.c b/src/core/display.c index b3d21d4a1..7f59a8413 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -1700,6 +1700,17 @@ get_input_event (MetaDisplay *display, switch (input_event->evtype) { + case XI_Motion: + case XI_ButtonPress: + case XI_ButtonRelease: + if (((XIDeviceEvent *) input_event)->deviceid == META_VIRTUAL_CORE_POINTER_ID) + return input_event; + break; + case XI_KeyPress: + case XI_KeyRelease: + if (((XIDeviceEvent *) input_event)->deviceid == META_VIRTUAL_CORE_KEYBOARD_ID) + return input_event; + break; case XI_FocusIn: case XI_FocusOut: if (((XIEnterEvent *) input_event)->deviceid == META_VIRTUAL_CORE_KEYBOARD_ID) @@ -3097,6 +3108,12 @@ xievent_get_modified_window (MetaDisplay *display, { switch (input_event->evtype) { + case XI_Motion: + case XI_ButtonPress: + case XI_ButtonRelease: + case XI_KeyPress: + case XI_KeyRelease: + return ((XIDeviceEvent *) input_event)->event; case XI_FocusIn: case XI_FocusOut: case XI_Enter: