- Fix building without Xfixes extension

- Fix building without Xevie
- Fix building without DPMS
- Fix "Extensions" section config file support to accept general boolean
    options
This commit is contained in:
Kevin E Martin 2004-08-09 02:08:35 +00:00
parent a2e51b13ea
commit 57eab4dc87
5 changed files with 58 additions and 23 deletions

View File

@ -1,4 +1,4 @@
/* $XdotOrg: xc/programs/Xserver/dix/events.c,v 1.4 2004/07/29 18:43:58 stukreit Exp $ */
/* $XdotOrg: xc/programs/Xserver/dix/events.c,v 1.5 2004/07/31 01:33:40 stukreit Exp $ */
/* $XFree86: xc/programs/Xserver/dix/events.c,v 3.51 2004/01/12 17:04:52 tsi Exp $ */
/************************************************************
@ -106,6 +106,7 @@ extern Bool XkbFilterEvents(ClientPtr, int, xEvent *);
#include "security.h"
#endif
#ifdef XEVIE
extern WindowPtr *WindowTable;
extern int xevieFlag;
extern int xevieClientIndex;
@ -117,7 +118,7 @@ extern int xevieEventSent;
extern int xevieKBEventSent;
int xeviegrabState = 0;
xEvent *xeviexE;
#endif
#include "XIproto.h"
#include "exevents.h"
@ -214,8 +215,11 @@ static struct {
WindowPtr confineWin; /* confine window */
#endif
} sprite; /* info about the cursor sprite */
#ifdef XEVIE
WindowPtr xeviewin;
HotSpot xeviehot;
#endif
static void DoEnterLeaveEvents(
WindowPtr /*fromWin*/,
@ -2688,6 +2692,7 @@ ProcessKeyboardEvent (xE, keybd, count)
GrabPtr grab = keybd->grab;
Bool deactivateGrab = FALSE;
register KeyClassPtr keyc = keybd->key;
#ifdef XEVIE
static Window rootWin = 0;
if(!xeviegrabState && xevieFlag && clients[xevieClientIndex] &&
@ -2732,7 +2737,7 @@ drawable.id:0;
}
}
}
#endif
if (!syncEvents.playingEvents)
{
@ -2878,6 +2883,7 @@ ProcessPointerEvent (xE, mouse, count)
#ifdef XKB
XkbSrvInfoPtr xkbi= inputInfo.keyboard->key->xkbInfo;
#endif
#ifdef XEVIE
if(xevieFlag && clients[xevieClientIndex] && !xeviegrabState &&
(xevieMask & xevieFilters[xE->u.u.type])) {
if(xevieEventSent)
@ -2888,6 +2894,7 @@ ProcessPointerEvent (xE, mouse, count)
return;
}
}
#endif
if (!syncEvents.playingEvents)
NoticeTime(xE)

View File

@ -44,7 +44,9 @@
#include "dmxdpms.h"
#include "dmxlog.h"
#include "dmxsync.h"
#ifdef DPMSExtension
#include "dpmsproc.h"
#endif
#include "windowstr.h" /* For screenIsSaved */
#include "X11/extensions/dpms.h"
@ -64,7 +66,9 @@ static void _dmxDPMSInit(DMXScreenInfo *dmxScreen)
dpmsGeneration = serverGeneration;
}
#ifdef DPMSExtension
if (DPMSDisabledSwitch) dpmsSupported = FALSE; /* -dpms turns off */
#endif
dmxScreen->dpmsCapable = 0;

View File

@ -1,4 +1,4 @@
/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86Config.c,v 1.2 2004/04/23 19:20:32 eich Exp $ */
/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86Config.c,v 1.3 2004/07/31 09:14:06 kem Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Config.c,v 3.276 2003/10/08 14:58:26 dawes Exp $ */
@ -2406,30 +2406,46 @@ configExtensions(XF86ConfExtensionsPtr conf_ext)
if (conf_ext && conf_ext->ext_option_lst) {
for (o = conf_ext->ext_option_lst; o; o = xf86NextOption(o)) {
char *name = xf86OptionName(o);
char *val = xf86OptionValue(o);
if (xf86NameCmp(val, "enable") == 0) {
if (EnableDisableExtension(name, TRUE)) {
xf86Msg(X_CONFIG, "Extension \"%s\" is enabled\n", name);
} else {
xf86Msg(X_ERROR,
"Extension \"%s\" is unrecognized\n", name);
return FALSE;
}
} else if (xf86NameCmp(val, "disable") == 0) {
if (EnableDisableExtension(name, FALSE)) {
xf86Msg(X_CONFIG, "Extension \"%s\" is disabled\n", name);
} else {
xf86Msg(X_ERROR,
"Extension \"%s\" is unrecognized\n", name);
return FALSE;
}
char *name = xf86OptionName(o);
char *val = xf86OptionValue(o);
char *n;
Bool enable = TRUE;
/* Handle "No<ExtensionName>" */
n = xf86NormalizeName(name);
if (strncmp(n, "no", 2) == 0) {
name += 2;
enable = FALSE;
}
if (!val ||
xf86NameCmp(val, "enable") == 0 ||
xf86NameCmp(val, "on") == 0 ||
xf86NameCmp(val, "1") == 0 ||
xf86NameCmp(val, "yes") == 0 ||
xf86NameCmp(val, "true") == 0) {
/* NOTHING NEEDED -- enabling is handled below */
} else if (xf86NameCmp(val, "disable") == 0 ||
xf86NameCmp(val, "off") == 0 ||
xf86NameCmp(val, "0") == 0 ||
xf86NameCmp(val, "no") == 0 ||
xf86NameCmp(val, "false") == 0) {
enable = !enable;
} else {
xf86Msg(X_ERROR,
"%s is not a valid value for the Extension option\n",
val);
return FALSE;
}
if (EnableDisableExtension(name, enable)) {
xf86Msg(X_CONFIG, "Extension \"%s\" is %s\n",
name, enable ? "enabled" : "disabled");
} else {
xf86Msg(X_ERROR,
"Extension \"%s\" is unrecognized\n", name);
return FALSE;
}
}
}

View File

@ -1,4 +1,4 @@
/* $XdotOrg$ */
/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/dixsym.c,v 1.2 2004/04/23 19:54:06 eich Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/dixsym.c,v 1.63 2003/12/03
* 17:11:29 tsi Exp $ */
@ -198,6 +198,7 @@ LOOKUP dixLookupTab[] = {
SYMFUNC(VerifyRectOrder)
SYMFUNC(SetDashes)
/* globals.c */
#ifdef DPMSExtension
SYMVAR(DPMSEnabled)
SYMVAR(DPMSCapableFlag)
SYMVAR(DPMSOffTime)
@ -207,6 +208,7 @@ LOOKUP dixLookupTab[] = {
SYMVAR(DPMSEnabledSwitch)
SYMVAR(DPMSDisabledSwitch)
SYMVAR(defaultDPMSEnabled)
#endif
/* bigreq */
SYMVAR(maxBigRequestSize)
#ifdef XV
@ -345,7 +347,9 @@ LOOKUP dixLookupTab[] = {
SYMFUNC(TimerFree)
SYMFUNC(TimerSet)
SYMFUNC(TimerCancel)
#ifdef DPMSExtension
SYMFUNC(SetDPMSTimers)
#endif
/* io.c */
SYMFUNC(WriteToClient)
SYMFUNC(SetCriticalOutputPending)

View File

@ -75,7 +75,9 @@
#include "xf86cmap.h"
#include "xf86fbman.h"
#include "dgaproc.h"
#ifdef DPMSExtension
#include "dpmsproc.h"
#endif
#include "vidmodeproc.h"
#include "xf86miscproc.h"
#include "loader.h"
@ -695,9 +697,11 @@ LOOKUP xfree86LookupTab[] = {
SYMFUNC(xf86XInputSetSendCoreEvents)
/* End merged segment */
#endif
#ifdef DPMSExtension
SYMFUNC(DPMSGet)
SYMFUNC(DPMSSet)
SYMFUNC(DPMSSupported)
#endif
/* xf86Debug.c */
#ifdef BUILDDEBUG
SYMFUNC(xf86Break1)