2006-11-26 11:13:41 -07:00
|
|
|
/************************************************************
|
|
|
|
|
|
|
|
Copyright 1987, 1998 The Open Group
|
|
|
|
|
|
|
|
Permission to use, copy, modify, distribute, and sell this software and its
|
|
|
|
documentation for any purpose is hereby granted without fee, provided that
|
|
|
|
the above copyright notice appear in all copies and that both that
|
|
|
|
copyright notice and this permission notice appear in supporting
|
|
|
|
documentation.
|
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
|
|
all copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
|
|
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
|
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
|
|
|
|
Except as contained in this notice, the name of The Open Group shall not be
|
|
|
|
used in advertising or otherwise to promote the sale, use or other dealings
|
|
|
|
in this Software without prior written authorization from The Open Group.
|
|
|
|
|
|
|
|
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
|
|
|
|
|
|
|
|
All Rights Reserved
|
|
|
|
|
2015-09-16 13:10:19 -06:00
|
|
|
Permission to use, copy, modify, and distribute this software and its
|
|
|
|
documentation for any purpose and without fee is hereby granted,
|
2006-11-26 11:13:41 -07:00
|
|
|
provided that the above copyright notice appear in all copies and that
|
2015-09-16 13:10:19 -06:00
|
|
|
both that copyright notice and this permission notice appear in
|
2006-11-26 11:13:41 -07:00
|
|
|
supporting documentation, and that the name of Digital not be
|
|
|
|
used in advertising or publicity pertaining to distribution of the
|
2015-09-16 13:10:19 -06:00
|
|
|
software without specific, written prior permission.
|
2006-11-26 11:13:41 -07:00
|
|
|
|
|
|
|
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
|
|
|
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
|
|
|
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
|
|
|
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
|
|
|
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
|
|
|
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
|
|
|
SOFTWARE.
|
|
|
|
|
|
|
|
********************************************************/
|
|
|
|
|
|
|
|
#ifdef HAVE_DIX_CONFIG_H
|
|
|
|
#include <dix-config.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <X11/X.h>
|
|
|
|
#include <X11/Xmd.h>
|
|
|
|
#include "misc.h"
|
|
|
|
#include "windowstr.h"
|
|
|
|
#include "scrnintstr.h"
|
|
|
|
#include "input.h"
|
|
|
|
#include "dixfont.h"
|
|
|
|
#include "site.h"
|
|
|
|
#include "dixstruct.h"
|
|
|
|
#include "os.h"
|
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
ScreenInfo screenInfo;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
KeybdCtrl defaultKeyboardControl = {
|
2012-06-10 07:21:05 -06:00
|
|
|
DEFAULT_KEYBOARD_CLICK,
|
|
|
|
DEFAULT_BELL,
|
|
|
|
DEFAULT_BELL_PITCH,
|
|
|
|
DEFAULT_BELL_DURATION,
|
|
|
|
DEFAULT_AUTOREPEAT,
|
|
|
|
DEFAULT_AUTOREPEATS,
|
|
|
|
DEFAULT_LEDS,
|
|
|
|
0
|
|
|
|
};
|
2006-11-26 11:13:41 -07:00
|
|
|
|
|
|
|
PtrCtrl defaultPointerControl = {
|
2012-06-10 07:21:05 -06:00
|
|
|
DEFAULT_PTR_NUMERATOR,
|
|
|
|
DEFAULT_PTR_DENOMINATOR,
|
|
|
|
DEFAULT_PTR_THRESHOLD,
|
|
|
|
0
|
|
|
|
};
|
|
|
|
|
|
|
|
ClientPtr clients[MAXCLIENTS];
|
|
|
|
ClientPtr serverClient;
|
|
|
|
int currentMaxClients; /* current size of clients array */
|
2010-07-27 13:02:24 -06:00
|
|
|
long maxBigRequestSize = MAX_BIG_REQUEST_SIZE;
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
unsigned long globalSerialNumber = 0;
|
|
|
|
unsigned long serverGeneration = 0;
|
2006-11-26 11:13:41 -07:00
|
|
|
|
|
|
|
/* these next four are initialized in main.c */
|
2010-07-27 13:02:24 -06:00
|
|
|
CARD32 ScreenSaverTime;
|
2006-11-26 11:13:41 -07:00
|
|
|
CARD32 ScreenSaverInterval;
|
2010-07-27 13:02:24 -06:00
|
|
|
int ScreenSaverBlanking;
|
2012-06-10 07:21:05 -06:00
|
|
|
int ScreenSaverAllowExposures;
|
2006-11-26 11:13:41 -07:00
|
|
|
|
|
|
|
#ifdef DPMSExtension
|
2010-07-27 13:02:24 -06:00
|
|
|
CARD16 DPMSPowerLevel = 0;
|
|
|
|
Bool DPMSDisabledSwitch = FALSE;
|
|
|
|
Bool DPMSCapableFlag = FALSE;
|
|
|
|
CARD32 DPMSStandbyTime;
|
|
|
|
CARD32 DPMSSuspendTime;
|
|
|
|
CARD32 DPMSOffTime;
|
|
|
|
Bool DPMSEnabled;
|
2006-11-26 11:13:41 -07:00
|
|
|
#endif
|
|
|
|
|
|
|
|
CARD32 defaultScreenSaverTime = DEFAULT_SCREEN_SAVER_TIME;
|
|
|
|
CARD32 defaultScreenSaverInterval = DEFAULT_SCREEN_SAVER_INTERVAL;
|
2012-06-10 07:21:05 -06:00
|
|
|
int defaultScreenSaverBlanking = DEFAULT_SCREEN_SAVER_BLANKING;
|
|
|
|
int defaultScreenSaverAllowExposures = DEFAULT_SCREEN_SAVER_EXPOSURES;
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
#ifdef SCREENSAVER
|
|
|
|
Bool screenSaverSuspended = FALSE;
|
|
|
|
#endif
|
|
|
|
|
2014-09-27 11:52:59 -06:00
|
|
|
const char *defaultFontPath = COMPILEDDEFAULTFONTPATH;
|
|
|
|
const char *defaultTextFont = COMPILEDDEFAULTFONT;
|
|
|
|
const char *defaultCursorFont = COMPILEDCURSORFONT;
|
2012-06-10 07:21:05 -06:00
|
|
|
FontPtr defaultFont; /* not declared in dix.h to avoid including font.h in
|
|
|
|
every compilation of dix code */
|
2006-11-26 11:13:41 -07:00
|
|
|
CursorPtr rootCursor;
|
2009-09-06 13:44:18 -06:00
|
|
|
#ifndef __OpenBSD__
|
|
|
|
Bool party_like_its_1989 = FALSE;
|
|
|
|
#else
|
|
|
|
Bool party_like_its_1989 = TRUE;
|
2008-11-02 08:26:08 -07:00
|
|
|
#endif
|
2009-09-06 13:44:18 -06:00
|
|
|
Bool whiteRoot = FALSE;
|
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
TimeStamp currentTime;
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
int defaultColorVisualClass = -1;
|
|
|
|
int monitorResolution = 0;
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2014-09-27 11:52:59 -06:00
|
|
|
const char *display;
|
|
|
|
int displayfd = -1;
|
|
|
|
Bool explicit_display = FALSE;
|
2009-09-06 13:44:18 -06:00
|
|
|
char *ConnectionInfo;
|
2006-11-26 11:13:41 -07:00
|
|
|
|
|
|
|
CARD32 TimeOutValue = DEFAULT_TIMEOUT * MILLI_PER_SECOND;
|