[xserver-commit] xizzle/common xf86Config.c,3.280,3.281 xf86Cursor.c,3.39,3.40 xf86Events.c,3.162,3.163 xf86Init.c,3.216,3.217 xf86Xinput.c,3.72,3.73 xf86cmap.c,1.27,1.28
Daniel Stone
xserver-commit@pdx.freedesktop.org
Committed by: daniel
Update of /cvs/xserver/xizzle/common
In directory pdx:/tmp/cvs-serv29046/common
Modified Files:
xf86Config.c xf86Cursor.c xf86Events.c xf86Init.c xf86Xinput.c
xf86cmap.c
Log Message:
Get rid of more autoconfig stuff.
Assume we're always going to be using DGA.
Index: xf86Config.c
===================================================================
RCS file: /cvs/xserver/xizzle/common/xf86Config.c,v
retrieving revision 3.280
retrieving revision 3.281
diff -u -d -r3.280 -r3.281
--- a/xf86Config.c 4 Mar 2004 02:33:00 -0000 3.280
+++ b/xf86Config.c 7 Mar 2004 13:43:01 -0000 3.281
@@ -2431,32 +2431,30 @@
* load the config file and fill the global data structure
*/
ConfigStatus
-xf86HandleConfigFile(Bool autoconfig)
+xf86HandleConfigFile()
{
const char *filename;
char *searchpath;
MessageType from = X_DEFAULT;
- if (!autoconfig) {
- if (getuid() == 0)
- searchpath = ROOT_CONFIGPATH;
- else
- searchpath = USER_CONFIGPATH;
-
- if (xf86ConfigFile)
- from = X_CMDLINE;
+ if (getuid() == 0)
+ searchpath = ROOT_CONFIGPATH;
+ else
+ searchpath = USER_CONFIGPATH;
+
+ if (xf86ConfigFile)
+ from = X_CMDLINE;
- filename = xf86openConfigFile(searchpath, xf86ConfigFile, PROJECTROOT);
- if (filename) {
- xf86MsgVerb(from, 0, "Using config file: \"%s\"\n", filename);
- xf86ConfigFile = xnfstrdup(filename);
- } else {
- xf86Msg(X_ERROR, "Unable to locate/open config file");
- if (xf86ConfigFile)
- xf86ErrorFVerb(0, ": \"%s\"", xf86ConfigFile);
- xf86ErrorFVerb(0, "\n");
- return CONFIG_NOFILE;
- }
+ filename = xf86openConfigFile(searchpath, xf86ConfigFile, PROJECTROOT);
+ if (filename) {
+ xf86MsgVerb(from, 0, "Using config file: \"%s\"\n", filename);
+ xf86ConfigFile = xnfstrdup(filename);
+ } else {
+ xf86Msg(X_ERROR, "Unable to locate/open config file");
+ if (xf86ConfigFile)
+ xf86ErrorFVerb(0, ": \"%s\"", xf86ConfigFile);
+ xf86ErrorFVerb(0, "\n");
+ return CONFIG_NOFILE;
}
if ((xf86configptr = xf86readConfigFile ()) == NULL) {
Index: xf86Cursor.c
===================================================================
RCS file: /cvs/xserver/xizzle/common/xf86Cursor.c,v
retrieving revision 3.39
retrieving revision 3.40
diff -u -d -r3.39 -r3.40
--- a/xf86Cursor.c 28 Feb 2004 01:27:38 -0000 3.39
+++ b/xf86Cursor.c 7 Mar 2004 13:43:02 -0000 3.40
@@ -49,9 +49,7 @@
#include <X11/extensions/XIproto.h>
#include "xf86Xinput.h"
-#ifdef XFreeXDGA
#include "dgaproc.h"
-#endif
typedef struct _xf86EdgeRec {
short screen;
@@ -209,10 +207,8 @@
if (!pScr->vtSema || !mode || !pScr->SwitchMode)
return FALSE;
-#ifdef XFreeXDGA
if (DGAActive(pScr->scrnIndex))
return FALSE;
-#endif
if (mode == pScr->currentMode)
return TRUE;
Index: xf86Events.c
===================================================================
RCS file: /cvs/xserver/xizzle/common/xf86Events.c,v
retrieving revision 3.162
retrieving revision 3.163
diff -u -d -r3.162 -r3.163
--- a/xf86Events.c 5 Mar 2004 06:53:17 -0000 3.162
+++ b/xf86Events.c 7 Mar 2004 13:43:02 -0000 3.163
@@ -70,9 +70,7 @@
#include "atKeynames.h"
-#ifdef XFreeXDGA
#include "dgaproc.h"
-#endif
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
@@ -281,9 +279,7 @@
switch (action) {
case ACTION_TERMINATE:
if (!xf86Info.dontZap) {
-#ifdef XFreeXDGA
DGAShutdown();
-#endif
GiveUp(0);
}
break;
@@ -1269,10 +1265,8 @@
ErrorF("xf86VTSwitch()\n");
#endif
-#ifdef XFreeXDGA
if(!DGAVTSwitch())
return;
-#endif
/*
* Since all screens are currently all in the same state it is sufficient
Index: xf86Init.c
===================================================================
RCS file: /cvs/xserver/xizzle/common/xf86Init.c,v
retrieving revision 3.216
retrieving revision 3.217
diff -u -d -r3.216 -r3.217
--- a/xf86Init.c 7 Mar 2004 13:35:02 -0000 3.216
+++ b/xf86Init.c 7 Mar 2004 13:43:02 -0000 3.217
@@ -53,9 +53,7 @@
#include "compiler.h"
#include "loaderProcs.h"
-#ifdef XFreeXDGA
#include "dgaproc.h"
-#endif
#define XF86_OS_PRIVS
#include "xf86.h"
@@ -93,10 +91,6 @@
static char *expKey = NULL;
#endif
-#ifdef __UNIXOS2__
-extern void os2ServerVideoAccess();
-#endif
-
void (*xf86OSPMClose)(void) = NULL;
static char *baseModules[] = {
@@ -260,11 +254,6 @@
Pix24Flags screenpix24, pix24;
MessageType pix24From = X_DEFAULT;
Bool pix24Fail = FALSE;
- Bool autoconfig = FALSE;
-
-#ifdef __UNIXOS2__
- os2ServerVideoAccess(); /* See if we have access to the screen before doing anything */
-#endif
xf86Initialising = TRUE;
@@ -308,14 +297,10 @@
case CONFIG_PARSE_ERROR:
xf86Msg(X_ERROR, "Error parsing the config file\n");
return;
- case CONFIG_NOFILE:
- autoconfig = TRUE;
- break;
}
}
- if (!autoconfig)
- PostConfigInit();
+ PostConfigInit();
/* Initialise the loader */
LoaderInit();
@@ -1157,9 +1142,7 @@
#ifdef USE_XF86_SERVERLOCK
xf86UnlockServer();
#endif
-#ifdef XFreeXDGA
DGAShutdown();
-#endif
xf86CloseConsole();
Index: xf86Xinput.c
===================================================================
RCS file: /cvs/xserver/xizzle/common/xf86Xinput.c,v
retrieving revision 3.72
retrieving revision 3.73
diff -u -d -r3.72 -r3.73
--- a/xf86Xinput.c 28 Feb 2004 01:27:38 -0000 3.72
+++ b/xf86Xinput.c 7 Mar 2004 13:43:02 -0000 3.73
@@ -69,9 +69,7 @@
#include "dpmsproc.h"
#endif
-#ifdef XFreeXDGA
#include "dgaproc.h"
-#endif
#include "exevents.h" /* AddInputDevice */
#include "exglobals.h"
@@ -668,13 +666,11 @@
switch (e->u.u.type) {
case KeyPress:
case KeyRelease:
-#ifdef XFreeXDGA
/* we do this here, because nobody seems to be calling
xf86PostKeyEvent(). We can't steal MotionNotify events here
because the motion-relative information has been lost already. */
if(DGAStealKeyEvent(xf86EventQueue.pEnqueueScreen->myNum, e))
return;
-#endif
/* fall through */
case ButtonPress:
case ButtonRelease:
@@ -682,13 +678,11 @@
count = 1;
break;
default:
-#ifdef XFreeXDGA
if (DGAIsDgaEvent (e))
{
count = 1;
break;
}
-#endif
if (!((deviceKeyButtonPointer *) e)->deviceid & MORE_EVENTS) {
count = 1;
}
@@ -790,10 +784,8 @@
break;
default:
-#ifdef XFreeXDGA
if (DGADeliverEvent (xf86EventQueue.pDequeueScreen, &xe.event))
break;
-#endif
dev_xe = (deviceKeyButtonPointer *) &xe.event;
id = dev_xe->deviceid & DEVICE_BITS;
if (!(dev_xe->deviceid & MORE_EVENTS)) {
@@ -995,7 +987,6 @@
*/
if (is_core ||
(is_shared && num_valuators >= 2 && loop_start == 0)) {
-#ifdef XFreeXDGA
/*
* Let DGA peek at the event and steal it
*/
@@ -1009,7 +1000,6 @@
if (DGAStealMouseEvent(xf86EventQueue.pEnqueueScreen->myNum,
xE, dx, dy))
continue;
-#endif
if (!(*local->conversion_proc)(local, loop_start, num,
axisvals[0], axisvals[1],
axisvals[2], axisvals[3],
@@ -1238,9 +1228,7 @@
xE->u.u.detail = device->button->map[button];
xf86Info.lastEventTime = xE->u.keyButtonPointer.time = GetTimeInMillis();
-#ifdef XFreeXDGA
if (!DGAStealMouseEvent(xf86EventQueue.pEnqueueScreen->myNum, xE, 0, 0))
-#endif
ENQUEUE(xE);
}
DBG(5, ErrorF("xf86PostButtonEvent END\n"));
@@ -1322,9 +1310,7 @@
xev->detail = key_code;
xf86Info.lastEventTime = xev->time = GetTimeInMillis();
-#ifdef XFreeXDGA
/* if(!DGAStealKeyEvent(xf86EventQueue.pEnqueueScreen->myNum, xE)) */
-#endif
ENQUEUE(xE);
}
Index: xf86cmap.c
===================================================================
RCS file: /cvs/xserver/xizzle/common/xf86cmap.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- a/xf86cmap.c 28 Feb 2004 01:27:38 -0000 1.27
+++ b/xf86cmap.c 7 Mar 2004 13:43:02 -0000 1.28
@@ -50,11 +50,9 @@
#include "xf86str.h"
#include "micmap.h"
-#ifdef XFreeXDGA
#define _XF86DGA_SERVER_
#include "extensions/xf86dgastr.h"
#include "dgaproc.h"
-#endif
#include "xf86cmap.h"
@@ -202,9 +200,7 @@
if ((flags & CMAP_RELOAD_ON_MODE_SWITCH) && pScrn->SwitchMode)
pScrn->SwitchMode = CMapSwitchMode;
}
-#ifdef XFreeXDGA
pScrn->SetDGAMode = CMapSetDGAMode;
-#endif
pScrn->ChangeGamma = CMapChangeGamma;
ComputeGamma(pScreenPriv);
@@ -479,7 +475,6 @@
return FALSE;
}
-#ifdef XFreeXDGA
static int
CMapSetDGAMode(int index, int num, DGADevicePtr dev)
{
@@ -498,7 +493,6 @@
return ret;
}
-#endif
/**** Utilities ****/