aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winclipboardwrappers.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin/winclipboardwrappers.c')
-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 c68d78aa3..233c0489b 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 */
@@ -505,8 +516,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;
}