summaryrefslogtreecommitdiff
path: root/hw/xwin/winclipboardthread.c
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2014-01-01 17:54:48 +0000
committerJon TURNEY <jon.turney@dronecode.org.uk>2014-09-13 14:05:44 +0100
commit6343b531d786dd4a9bb52050c9ef267a04374b57 (patch)
tree04139527c553822b8d20f5c0c61404a145bf2f19 /hw/xwin/winclipboardthread.c
parentd3427717f2c6a473dc3d20631dff653e4e37228e (diff)
hw/xwin: Remove left-over pthread_exit() in clipboard code
Commit c1bf3baa44fbd8af33a2b3ce045324485b85a7a7 removed all but one of the pthread_exit() calls which used to call winClipboardThreadExit() Fix the final remaining one to exit via done label on IOError instead. Also fix a comment and report pre-flush failure to log, but do not exit Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Diffstat (limited to 'hw/xwin/winclipboardthread.c')
-rw-r--r--hw/xwin/winclipboardthread.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/hw/xwin/winclipboardthread.c b/hw/xwin/winclipboardthread.c
index e70896081..4a9eb4c32 100644
--- a/hw/xwin/winclipboardthread.c
+++ b/hw/xwin/winclipboardthread.c
@@ -141,7 +141,7 @@ winClipboardProc(void *pvNotUsed)
else if (iReturn == WIN_JMP_ERROR_IO) {
/* TODO: Cleanup the Win32 window and free any allocated memory */
ErrorF("winClipboardProc - setjmp returned for IO Error Handler.\n");
- pthread_exit(NULL);
+ goto winClipboardProc_Done;
}
/* Use our generated cookie for authentication */
@@ -184,7 +184,7 @@ winClipboardProc(void *pvNotUsed)
goto winClipboardProc_Done;
}
- /* Save the display in the screen privates */
+ /* Save the display in a global used by the wndproc */
g_pClipboardDisplay = pDisplay;
ErrorF("winClipboardProc - XOpenDisplay () returned and "
@@ -269,8 +269,9 @@ winClipboardProc(void *pvNotUsed)
winClipboardFlushXEvents(hwnd, iWindow, pDisplay, fUseUnicode);
/* Pre-flush Windows messages */
- if (!winClipboardFlushWindowsMessageQueue(hwnd))
- return 0;
+ if (!winClipboardFlushWindowsMessageQueue(hwnd)) {
+ ErrorF("winClipboardProc - winClipboardFlushWindowsMessageQueue failed\n");
+ }
/* Signal that the clipboard client has started */
g_fClipboardStarted = TRUE;