Skip to content
Commit 995fb60f authored by Derek Foreman's avatar Derek Foreman Committed by Marius Vlad
Browse files

xwm: Propagate selection ownership immediately



If we don't xcb_flush() when we set the selection owner, we end up with
a ridiculous corner case where we can run use a command line X client
like 'xclip -i -selection clipboard' to crash weston.

Start weston, ensure Xwayland is running (set a selection with xclip), set
the clipboard from a wayland client, then set the clipboard with xclip
again.

Since xclip doesn't do anything xwm notices except set the clipboard, it
won't provoke a flush on our selection ownership change. xclip will take
ownership, then we call xcb_convert_selection(), and THEN we flush, sending
out our pending ownership change and the xcb_convert_selection() request.

The ownership change takes place first, we attempt to get our own selection
and weston explodes in a mess.

Stop this from happening with a flush when changing selection ownership.

Signed-off-by: default avatarDerek Foreman <derek.foreman@collabora.com>
(cherry picked from commit 11bcad11)
parent f5fafa05
Loading
Loading
Loading
Pipeline #760560 passed with stages
in 2 minutes and 53 seconds
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment