diff --git a/hw/xwin/winclipboardinit.c b/hw/xwin/winclipboardinit.c index a3c1261d7..0b895cb8c 100644 --- a/hw/xwin/winclipboardinit.c +++ b/hw/xwin/winclipboardinit.c @@ -79,9 +79,14 @@ winClipboardThreadProc(void *arg) /* Flag that clipboard client has been launched */ g_fClipboardLaunched = TRUE; + g_fClipboardStarted = TRUE; winClipboardProc(arg); + /* Flag that clipboard client has stopped */ + g_fClipboardLaunched = FALSE; + g_fClipboardStarted = FALSE; + /* checking if we need to restart */ if (clipboardRestarts >= WIN_CLIPBOARD_RETRIES) { /* terminates clipboard thread but the main server still lives */ diff --git a/hw/xwin/winclipboardthread.c b/hw/xwin/winclipboardthread.c index fd1fc0731..2ef73bde9 100644 --- a/hw/xwin/winclipboardthread.c +++ b/hw/xwin/winclipboardthread.c @@ -52,8 +52,6 @@ */ extern Bool g_fUnicodeClipboard; -extern Bool g_fClipboardStarted; -extern Bool g_fClipboardLaunched; extern Bool g_fClipboard; extern HWND g_hwndClipboard; extern void *g_pClipboardDisplay; @@ -274,9 +272,6 @@ winClipboardProc(void *pvNotUsed) ErrorF("winClipboardProc - winClipboardFlushWindowsMessageQueue failed\n"); } - /* Signal that the clipboard client has started */ - g_fClipboardStarted = TRUE; - /* Loop for X events */ while (1) { /* Setup the file descriptor set */ @@ -395,8 +390,6 @@ winClipboardProc(void *pvNotUsed) #endif /* global clipboard variable reset */ - g_fClipboardLaunched = FALSE; - g_fClipboardStarted = FALSE; g_iClipboardWindow = None; g_pClipboardDisplay = NULL; g_hwndClipboard = NULL;