xserver

xserver with xephyr scale patch
git clone https://git.neptards.moe/u3shit/xserver.git
Log | Files | Refs | README | LICENSE

winglobals.c (3139B)


      1 /*
      2  *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved.
      3  *Copyright (C) Colin Harrison 2005-2008
      4  *
      5  *Permission is hereby granted, free of charge, to any person obtaining
      6  * a copy of this software and associated documentation files (the
      7  *"Software"), to deal in the Software without restriction, including
      8  *without limitation the rights to use, copy, modify, merge, publish,
      9  *distribute, sublicense, and/or sell copies of the Software, and to
     10  *permit persons to whom the Software is furnished to do so, subject to
     11  *the following conditions:
     12  *
     13  *The above copyright notice and this permission notice shall be
     14  *included in all copies or substantial portions of the Software.
     15  *
     16  *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
     17  *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
     18  *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
     19  *NONINFRINGEMENT. IN NO EVENT SHALL HAROLD L HUNT II BE LIABLE FOR
     20  *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
     21  *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
     22  *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     23  *
     24  *Except as contained in this notice, the name of Harold L Hunt II
     25  *shall not be used in advertising or otherwise to promote the sale, use
     26  *or other dealings in this Software without prior written authorization
     27  *from Harold L Hunt II.
     28  *
     29  * Authors:	Harold L Hunt II
     30  *              Colin Harrison
     31  */
     32 
     33 #ifdef HAVE_XWIN_CONFIG_H
     34 #include <xwin-config.h>
     35 #endif
     36 #include "win.h"
     37 
     38 /*
     39  * General global variables
     40  */
     41 
     42 int g_iNumScreens = 0;
     43 winScreenInfo *g_ScreenInfo = 0;
     44 
     45 #ifdef HAS_DEVWINDOWS
     46 int g_fdMessageQueue = WIN_FD_INVALID;
     47 #endif
     48 DevPrivateKeyRec g_iScreenPrivateKeyRec;
     49 DevPrivateKeyRec g_iCmapPrivateKeyRec;
     50 DevPrivateKeyRec g_iGCPrivateKeyRec;
     51 DevPrivateKeyRec g_iPixmapPrivateKeyRec;
     52 DevPrivateKeyRec g_iWindowPrivateKeyRec;
     53 unsigned long g_ulServerGeneration = 0;
     54 DWORD g_dwEnginesSupported = 0;
     55 HINSTANCE g_hInstance = 0;
     56 HWND g_hDlgDepthChange = NULL;
     57 HWND g_hDlgExit = NULL;
     58 HWND g_hDlgAbout = NULL;
     59 const char *g_pszQueryHost = NULL;
     60 Bool g_fXdmcpEnabled = FALSE;
     61 Bool g_fAuthEnabled = FALSE;
     62 Bool g_fCompositeAlpha = FALSE;
     63 HICON g_hIconX = NULL;
     64 HICON g_hSmallIconX = NULL;
     65 
     66 #ifndef RELOCATE_PROJECTROOT
     67 const char *g_pszLogFile = DEFAULT_LOGDIR "/XWin.%s.log";
     68 #else
     69 const char *g_pszLogFile = "XWin.log";
     70 Bool g_fLogFileChanged = FALSE;
     71 #endif
     72 int g_iLogVerbose = 2;
     73 Bool g_fLogInited = FALSE;
     74 char *g_pszCommandLine = NULL;
     75 Bool g_fSilentFatalError = FALSE;
     76 DWORD g_dwCurrentThreadID = 0;
     77 Bool g_fKeyboardHookLL = FALSE;
     78 Bool g_fNoHelpMessageBox = FALSE;
     79 Bool g_fSoftwareCursor = FALSE;
     80 Bool g_fNativeGl = TRUE;
     81 Bool g_fHostInTitle = TRUE;
     82 pthread_mutex_t g_pmTerminating = PTHREAD_MUTEX_INITIALIZER;
     83 
     84 /*
     85  * Wrapped DIX functions
     86  */
     87 winDispatchProcPtr winProcEstablishConnectionOrig = NULL;
     88 
     89 /*
     90  * Clipboard variables
     91  */
     92 
     93 Bool g_fClipboard = TRUE;
     94 Bool g_fClipboardStarted = FALSE;
     95 
     96 /*
     97  * Re-initialize global variables that are invalidated
     98  * by a server reset.
     99  */
    100 
    101 void
    102 winInitializeGlobals(void)
    103 {
    104     g_dwCurrentThreadID = GetCurrentThreadId();
    105 }