diff --git a/src/wayland/meta-xwayland-selection.c b/src/wayland/meta-xwayland-selection.c index 5735fe438..a8806f17e 100644 --- a/src/wayland/meta-xwayland-selection.c +++ b/src/wayland/meta-xwayland-selection.c @@ -1129,6 +1129,9 @@ meta_xwayland_selection_handle_selection_notify (MetaWaylandCompositor *composit if (!selection) return FALSE; + if (selection->window != event->requestor) + return FALSE; + /* convert selection failed */ if (event->property == None) { @@ -1261,6 +1264,9 @@ meta_xwayland_selection_handle_selection_request (MetaWaylandCompositor *composi if (!selection) return FALSE; + if (selection->window != event->owner) + return FALSE; + /* We must fetch from the currently active source, not the Xwayland one */ data_source = data_device_get_active_source_for_atom (&compositor->seat->data_device, selection->selection_atom);