hw/xwin: Hoist setting of g_fClipboardStarted flag up one level
Hoist the setting of g_fClipboardStarted flag up one level. Also move up the clearing of the g_fClipboardLaunched at the end of clipboard function. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
parent
290dbff075
commit
42d1381082
|
@ -79,9 +79,14 @@ winClipboardThreadProc(void *arg)
|
||||||
|
|
||||||
/* Flag that clipboard client has been launched */
|
/* Flag that clipboard client has been launched */
|
||||||
g_fClipboardLaunched = TRUE;
|
g_fClipboardLaunched = TRUE;
|
||||||
|
g_fClipboardStarted = TRUE;
|
||||||
|
|
||||||
winClipboardProc(arg);
|
winClipboardProc(arg);
|
||||||
|
|
||||||
|
/* Flag that clipboard client has stopped */
|
||||||
|
g_fClipboardLaunched = FALSE;
|
||||||
|
g_fClipboardStarted = FALSE;
|
||||||
|
|
||||||
/* checking if we need to restart */
|
/* checking if we need to restart */
|
||||||
if (clipboardRestarts >= WIN_CLIPBOARD_RETRIES) {
|
if (clipboardRestarts >= WIN_CLIPBOARD_RETRIES) {
|
||||||
/* terminates clipboard thread but the main server still lives */
|
/* terminates clipboard thread but the main server still lives */
|
||||||
|
|
|
@ -52,8 +52,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern Bool g_fUnicodeClipboard;
|
extern Bool g_fUnicodeClipboard;
|
||||||
extern Bool g_fClipboardStarted;
|
|
||||||
extern Bool g_fClipboardLaunched;
|
|
||||||
extern Bool g_fClipboard;
|
extern Bool g_fClipboard;
|
||||||
extern HWND g_hwndClipboard;
|
extern HWND g_hwndClipboard;
|
||||||
extern void *g_pClipboardDisplay;
|
extern void *g_pClipboardDisplay;
|
||||||
|
@ -274,9 +272,6 @@ winClipboardProc(void *pvNotUsed)
|
||||||
ErrorF("winClipboardProc - winClipboardFlushWindowsMessageQueue failed\n");
|
ErrorF("winClipboardProc - winClipboardFlushWindowsMessageQueue failed\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Signal that the clipboard client has started */
|
|
||||||
g_fClipboardStarted = TRUE;
|
|
||||||
|
|
||||||
/* Loop for X events */
|
/* Loop for X events */
|
||||||
while (1) {
|
while (1) {
|
||||||
/* Setup the file descriptor set */
|
/* Setup the file descriptor set */
|
||||||
|
@ -395,8 +390,6 @@ winClipboardProc(void *pvNotUsed)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* global clipboard variable reset */
|
/* global clipboard variable reset */
|
||||||
g_fClipboardLaunched = FALSE;
|
|
||||||
g_fClipboardStarted = FALSE;
|
|
||||||
g_iClipboardWindow = None;
|
g_iClipboardWindow = None;
|
||||||
g_pClipboardDisplay = NULL;
|
g_pClipboardDisplay = NULL;
|
||||||
g_hwndClipboard = NULL;
|
g_hwndClipboard = NULL;
|
||||||
|
|
Loading…
Reference in New Issue