[mutter] backend-x11: Set the proper coordinates on the spoofed device event



commit a027937ccc3213cbc2f5e54eebeadda9c3da9c03
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Apr 24 12:02:34 2014 -0400

    backend-x11: Set the proper coordinates on the spoofed device event
    
    When we click on a window with a passive grab, then the event_x
    and event_y will be relative to that window, instead of relative to
    the stage, which means that picking will be wrong.
    
    Forcibly using root_x / root_y breaks nested mode. Nested mode is
    a testing mode that should be replaced by a DRI3-enabled Xephyr,
    though. It's getting too hairy to support properly.

 src/backends/x11/meta-backend-x11.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/x11/meta-backend-x11.c b/src/backends/x11/meta-backend-x11.c
index 9533ece..089b8c2 100644
--- a/src/backends/x11/meta-backend-x11.c
+++ b/src/backends/x11/meta-backend-x11.c
@@ -101,6 +101,8 @@ maybe_spoof_event_as_stage_event (MetaBackendX11 *x11,
             MetaCompositor *compositor = display->compositor;
             ClutterStage *stage = CLUTTER_STAGE (compositor->stage);
             device_event->event = clutter_x11_get_stage_window (stage);
+            device_event->event_x = device_event->root_x;
+            device_event->event_y = device_event->root_y;
             break;
           }
         default:


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