[mutter/wayland] Partially revert 5c99eae8a9ca04f5e89e60a314d3e19c7ef0a715



commit 98e3e5e50f9c51b7915af2adeef23af9831a6195
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Thu Feb 27 23:45:49 2014 +0100

    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 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index b3d21d4..7f59a84 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:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]