aboutsummaryrefslogtreecommitdiff
path: root/xorg-server
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-08-31 05:12:42 +0000
committermarha <marha@users.sourceforge.net>2009-08-31 05:12:42 +0000
commitb3ded1264131db861d4bc28de80cebc7b1a27d26 (patch)
treeed1b43c93def1740df3bbdf8c2ce620d66d60bd6 /xorg-server
parent54545d4fd33feef05153369ec16e588cef3e52bc (diff)
downloadvcxsrv-b3ded1264131db861d4bc28de80cebc7b1a27d26.tar.gz
vcxsrv-b3ded1264131db861d4bc28de80cebc7b1a27d26.tar.bz2
vcxsrv-b3ded1264131db861d4bc28de80cebc7b1a27d26.zip
Wait for clipboard thread to be started when already launched but not yet started.
Diffstat (limited to 'xorg-server')
-rw-r--r--xorg-server/hw/xwin/winclipboardwrappers.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/xorg-server/hw/xwin/winclipboardwrappers.c b/xorg-server/hw/xwin/winclipboardwrappers.c
index 5578182c1..1e4f910ba 100644
--- a/xorg-server/hw/xwin/winclipboardwrappers.c
+++ b/xorg-server/hw/xwin/winclipboardwrappers.c
@@ -342,9 +342,20 @@ winProcSetSelectionOwner (ClientPtr client)
/* Abort if clipboard not completely initialized yet */
if (!g_fClipboardStarted)
{
- ErrorF ("winProcSetSelectionOwner - Clipboard not yet started, "
- "aborting.\n");
- goto winProcSetSelectionOwner_Done;
+ if (g_fClipboardLaunched)
+ {
+ // Just wait until it is started
+ ErrorF ("winProcSetSelectionOwner - waiting to be started.\n");
+ while (g_fClipboardLaunched && !g_fClipboardStarted)
+ Sleep(0);
+ ErrorF ("winProcSetSelectionOwner - Clipboard started.\n");
+ }
+ else
+ {
+ ErrorF ("winProcSetSelectionOwner - Clipboard not yet started, "
+ "aborting.\n");
+ goto winProcSetSelectionOwner_Done;
+ }
}
/* Grab window if we have one */
@@ -511,8 +522,8 @@ winProcSetSelectionOwner (ClientPtr client)
/* Access the Windows clipboard */
if (!OpenClipboard (g_hwndClipboard))
{
- ErrorF ("winProcSetSelectionOwner - OpenClipboard () failed: %08x\n",
- (int) GetLastError ());
+ ErrorF ("winProcSetSelectionOwner - OpenClipboard () failed: %08x, hwnd: %08x\n",
+ (int) GetLastError (),g_hwndClipboard);
goto winProcSetSelectionOwner_Done;
}