105b261ecSmrg/* 205b261ecSmrg *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved. 36747b715Smrg *Copyright (C) Colin Harrison 2005-2008 405b261ecSmrg * 505b261ecSmrg *Permission is hereby granted, free of charge, to any person obtaining 605b261ecSmrg * a copy of this software and associated documentation files (the 705b261ecSmrg *"Software"), to deal in the Software without restriction, including 805b261ecSmrg *without limitation the rights to use, copy, modify, merge, publish, 905b261ecSmrg *distribute, sublicense, and/or sell copies of the Software, and to 1005b261ecSmrg *permit persons to whom the Software is furnished to do so, subject to 1105b261ecSmrg *the following conditions: 1205b261ecSmrg * 1305b261ecSmrg *The above copyright notice and this permission notice shall be 1405b261ecSmrg *included in all copies or substantial portions of the Software. 1505b261ecSmrg * 1605b261ecSmrg *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 1705b261ecSmrg *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1805b261ecSmrg *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 1905b261ecSmrg *NONINFRINGEMENT. IN NO EVENT SHALL HAROLD L HUNT II BE LIABLE FOR 2005b261ecSmrg *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 2105b261ecSmrg *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 2205b261ecSmrg *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 2305b261ecSmrg * 2405b261ecSmrg *Except as contained in this notice, the name of Harold L Hunt II 2505b261ecSmrg *shall not be used in advertising or otherwise to promote the sale, use 2605b261ecSmrg *or other dealings in this Software without prior written authorization 2705b261ecSmrg *from Harold L Hunt II. 2805b261ecSmrg * 2905b261ecSmrg * Authors: Harold L Hunt II 306747b715Smrg * Colin Harrison 3105b261ecSmrg */ 3205b261ecSmrg 3305b261ecSmrg#ifdef HAVE_XWIN_CONFIG_H 3405b261ecSmrg#include <xwin-config.h> 3505b261ecSmrg#endif 3605b261ecSmrg#include "win.h" 3705b261ecSmrg 3805b261ecSmrg/* 3905b261ecSmrg * General global variables 4005b261ecSmrg */ 4105b261ecSmrg 4235c4bbdfSmrgint g_iNumScreens = 0; 4335c4bbdfSmrgwinScreenInfo *g_ScreenInfo = 0; 4435c4bbdfSmrg 4505b261ecSmrg#ifdef HAS_DEVWINDOWS 4635c4bbdfSmrgint g_fdMessageQueue = WIN_FD_INVALID; 4705b261ecSmrg#endif 486747b715SmrgDevPrivateKeyRec g_iScreenPrivateKeyRec; 496747b715SmrgDevPrivateKeyRec g_iCmapPrivateKeyRec; 506747b715SmrgDevPrivateKeyRec g_iGCPrivateKeyRec; 516747b715SmrgDevPrivateKeyRec g_iPixmapPrivateKeyRec; 526747b715SmrgDevPrivateKeyRec g_iWindowPrivateKeyRec; 5335c4bbdfSmrgunsigned long g_ulServerGeneration = 0; 5435c4bbdfSmrgDWORD g_dwEnginesSupported = 0; 5535c4bbdfSmrgHINSTANCE g_hInstance = 0; 5635c4bbdfSmrgHWND g_hDlgDepthChange = NULL; 5735c4bbdfSmrgHWND g_hDlgExit = NULL; 5835c4bbdfSmrgHWND g_hDlgAbout = NULL; 5935c4bbdfSmrgconst char *g_pszQueryHost = NULL; 6035c4bbdfSmrgBool g_fXdmcpEnabled = FALSE; 6135c4bbdfSmrgBool g_fAuthEnabled = FALSE; 62ed6184dfSmrgBool g_fCompositeAlpha = FALSE; 6335c4bbdfSmrgHICON g_hIconX = NULL; 6435c4bbdfSmrgHICON g_hSmallIconX = NULL; 6535c4bbdfSmrg 6605b261ecSmrg#ifndef RELOCATE_PROJECTROOT 6735c4bbdfSmrgconst char *g_pszLogFile = DEFAULT_LOGDIR "/XWin.%s.log"; 6805b261ecSmrg#else 6935c4bbdfSmrgconst char *g_pszLogFile = "XWin.log"; 7035c4bbdfSmrgBool g_fLogFileChanged = FALSE; 7105b261ecSmrg#endif 7235c4bbdfSmrgint g_iLogVerbose = 2; 7335c4bbdfSmrgBool g_fLogInited = FALSE; 7435c4bbdfSmrgchar *g_pszCommandLine = NULL; 7535c4bbdfSmrgBool g_fSilentFatalError = FALSE; 7635c4bbdfSmrgDWORD g_dwCurrentThreadID = 0; 7735c4bbdfSmrgBool g_fKeyboardHookLL = FALSE; 7835c4bbdfSmrgBool g_fNoHelpMessageBox = FALSE; 7935c4bbdfSmrgBool g_fSoftwareCursor = FALSE; 8035c4bbdfSmrgBool g_fNativeGl = TRUE; 8135c4bbdfSmrgBool g_fHostInTitle = TRUE; 8235c4bbdfSmrgpthread_mutex_t g_pmTerminating = PTHREAD_MUTEX_INITIALIZER; 8305b261ecSmrg 8405b261ecSmrg/* 8505b261ecSmrg * Wrapped DIX functions 8605b261ecSmrg */ 8735c4bbdfSmrgwinDispatchProcPtr winProcEstablishConnectionOrig = NULL; 8805b261ecSmrg 8905b261ecSmrg/* 9005b261ecSmrg * Clipboard variables 9105b261ecSmrg */ 9205b261ecSmrg 9335c4bbdfSmrgBool g_fClipboard = TRUE; 9435c4bbdfSmrgBool g_fClipboardStarted = FALSE; 9505b261ecSmrg 9605b261ecSmrg/* 9705b261ecSmrg * Re-initialize global variables that are invalidated 9805b261ecSmrg * by a server reset. 9905b261ecSmrg */ 10005b261ecSmrg 10105b261ecSmrgvoid 10235c4bbdfSmrgwinInitializeGlobals(void) 10305b261ecSmrg{ 10435c4bbdfSmrg g_dwCurrentThreadID = GetCurrentThreadId(); 10505b261ecSmrg} 106