From a027937ccc3213cbc2f5e54eebeadda9c3da9c03 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Thu, 24 Apr 2014 12:02:34 -0400 Subject: [PATCH] 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 file changed, 2 insertions(+) diff --git a/src/backends/x11/meta-backend-x11.c b/src/backends/x11/meta-backend-x11.c index 9533eceb2..089b8c2fb 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: