hw/xwin: Mitigate a race condition in clipboard thread initialization

Remove the variables g_fClipboardLaunched and g_fClipboardStarted from
winInitializeGlobals(), as their re-initialization is handled in the
file hw/xwin/InitOutput.c.

Re-initializing g_fClipboardLaunched and g_fClipboardStarted during
the server reset procedure can lead to the clipboard thread being
launched two times and sometimes leads to a crash of the X server...

Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
Michel Hummel 2010-08-06 15:23:52 +01:00 committed by Jon TURNEY
parent 95b1391fe3
commit 75fe336b6c

View File

@ -114,8 +114,6 @@ winInitializeGlobals (void)
{
g_dwCurrentThreadID = GetCurrentThreadId ();
#ifdef XWIN_CLIPBOARD
g_fClipboardLaunched = FALSE;
g_fClipboardStarted = FALSE;
g_iClipboardWindow = None;
g_pClipboardDisplay = NULL;
g_atomLastOwnedSelection = None;