xwayland: Ensure we've got an owner when setting the X selection owner

Otherwise we may end up claiming the X selection when there's no wayland
selection owner.
This commit is contained in:
Carlos Garnacho 2015-05-18 20:58:29 +02:00
parent 719d8bd0c7
commit 0b0ce4193f

View File

@ -850,7 +850,7 @@ meta_selection_bridge_ownership_notify (struct wl_listener *listener,
XSetSelectionOwner (xdisplay, selection->selection_atom,
None, selection->timestamp);
}
else if (selection->source != owner)
else if (owner && selection->source != owner)
{
XSetSelectionOwner (xdisplay,
selection->selection_atom,