diff options
Diffstat (limited to 'xorg-server')
-rw-r--r-- | xorg-server/hw/xwin/winclipboardwrappers.c | 21 |
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; } |