Create a thread-specific selection window to make sure we receive the
selection events in the correct thread.
diff --git a/server/clipboard.c b/server/clipboard.c
index 063fe8c..3f9db20 100644
--- a/server/clipboard.c
+++ b/server/clipboard.c
@@ -80,7 +80,7 @@
static int set_clipboard_owner(user_handle_t win, int clear)
{
- if (cbthread && cbthread != current)
+ if (cbthread && cbthread->process != current->process)
{
set_error(STATUS_WAS_LOCKED);
return 0;
@@ -166,4 +166,8 @@
if (cbowner == current)
reply->flags |= CB_OWNER;
+
+ if (cbowner &&
+ cbowner->process == current->process)
+ reply->flags |= CB_PROCESS;
}