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.
This commit is contained in:
Jasper St. Pierre 2014-04-24 12:02:34 -04:00
parent 925075ddaf
commit a027937ccc

View File

@ -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: