summaryrefslogtreecommitdiff
path: root/dix/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'dix/main.c')
-rw-r--r--dix/main.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/dix/main.c b/dix/main.c
index ed6b6f6e1..0d0842215 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/dix/main.c,v 1.1.4.5.2.4 2004/03/08 00:36:56 alanc Exp $ */
+/* $XdotOrg: xc/programs/Xserver/dix/main.c,v 1.3 2004/06/30 20:06:53 kem Exp $ */
/* $XFree86: xc/programs/Xserver/dix/main.c,v 3.43 2003/10/30 21:21:02 herrb Exp $ */
/***********************************************************
@@ -251,6 +251,8 @@ main(int argc, char *argv[], char *envp[])
display = "0";
+ InitGlobals();
+
/* Quartz support on Mac OS X requires that the Cocoa event loop be in
* the main thread. This allows the X server main to be called again
* from another thread. */
@@ -498,6 +500,21 @@ main(int argc, char *argv[], char *envp[])
return(0);
}
+static int VendorRelease = VENDOR_RELEASE;
+static char *VendorString = VENDOR_STRING;
+
+void
+SetVendorRelease(int release)
+{
+ VendorRelease = release;
+}
+
+void
+SetVendorString(char *string)
+{
+ VendorString = string;
+}
+
static int padlength[4] = {0, 3, 2, 1};
#ifndef PANORAMIX
@@ -521,7 +538,7 @@ CreateConnectionBlock()
/* Leave off the ridBase and ridMask, these must be sent with
connection */
- setup.release = VENDOR_RELEASE;
+ setup.release = VendorRelease;
/*
* per-server image and bitmap parameters are defined in Xmd.h
*/
@@ -533,7 +550,7 @@ CreateConnectionBlock()
setup.bitmapBitOrder = screenInfo.bitmapBitOrder;
setup.motionBufferSize = NumMotionEvents();
setup.numRoots = screenInfo.numScreens;
- setup.nbytesVendor = strlen(VENDOR_STRING);
+ setup.nbytesVendor = strlen(VendorString);
setup.numFormats = screenInfo.numPixmapFormats;
setup.maxRequestSize = MAX_REQUEST_SIZE;
QueryMinMaxKeyCodes(&setup.minKeyCode, &setup.maxKeyCode);
@@ -550,7 +567,7 @@ CreateConnectionBlock()
sizesofar = sizeof(xConnSetup);
pBuf = ConnectionInfo + sizeof(xConnSetup);
- memmove(pBuf, VENDOR_STRING, (int)setup.nbytesVendor);
+ memmove(pBuf, VendorString, (int)setup.nbytesVendor);
sizesofar += setup.nbytesVendor;
pBuf += setup.nbytesVendor;
i = padlength[setup.nbytesVendor & 3];