- 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 $ */ /* $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" #include "security.h"
#endif #endif
#ifdef XEVIE
extern WindowPtr *WindowTable; extern WindowPtr *WindowTable;
extern int xevieFlag; extern int xevieFlag;
extern int xevieClientIndex; extern int xevieClientIndex;
@ -117,7 +118,7 @@ extern int xevieEventSent;
extern int xevieKBEventSent; extern int xevieKBEventSent;
int xeviegrabState = 0; int xeviegrabState = 0;
xEvent *xeviexE; xEvent *xeviexE;
#endif
#include "XIproto.h" #include "XIproto.h"
#include "exevents.h" #include "exevents.h"
@ -214,8 +215,11 @@ static struct {
WindowPtr confineWin; /* confine window */ WindowPtr confineWin; /* confine window */
#endif #endif
} sprite; /* info about the cursor sprite */ } sprite; /* info about the cursor sprite */
#ifdef XEVIE
WindowPtr xeviewin; WindowPtr xeviewin;
HotSpot xeviehot; HotSpot xeviehot;
#endif
static void DoEnterLeaveEvents( static void DoEnterLeaveEvents(
WindowPtr /*fromWin*/, WindowPtr /*fromWin*/,
@ -2688,6 +2692,7 @@ ProcessKeyboardEvent (xE, keybd, count)
GrabPtr grab = keybd->grab; GrabPtr grab = keybd->grab;
Bool deactivateGrab = FALSE; Bool deactivateGrab = FALSE;
register KeyClassPtr keyc = keybd->key; register KeyClassPtr keyc = keybd->key;
#ifdef XEVIE
static Window rootWin = 0; static Window rootWin = 0;
if(!xeviegrabState && xevieFlag && clients[xevieClientIndex] && if(!xeviegrabState && xevieFlag && clients[xevieClientIndex] &&
@ -2732,7 +2737,7 @@ drawable.id:0;
} }
} }
} }
#endif
if (!syncEvents.playingEvents) if (!syncEvents.playingEvents)
{ {
@ -2878,6 +2883,7 @@ ProcessPointerEvent (xE, mouse, count)
#ifdef XKB #ifdef XKB
XkbSrvInfoPtr xkbi= inputInfo.keyboard->key->xkbInfo; XkbSrvInfoPtr xkbi= inputInfo.keyboard->key->xkbInfo;
#endif #endif
#ifdef XEVIE
if(xevieFlag && clients[xevieClientIndex] && !xeviegrabState && if(xevieFlag && clients[xevieClientIndex] && !xeviegrabState &&
(xevieMask & xevieFilters[xE->u.u.type])) { (xevieMask & xevieFilters[xE->u.u.type])) {
if(xevieEventSent) if(xevieEventSent)
@ -2888,6 +2894,7 @@ ProcessPointerEvent (xE, mouse, count)
return; return;
} }
} }
#endif
if (!syncEvents.playingEvents) if (!syncEvents.playingEvents)
NoticeTime(xE) NoticeTime(xE)

View File

@ -44,7 +44,9 @@
#include "dmxdpms.h" #include "dmxdpms.h"
#include "dmxlog.h" #include "dmxlog.h"
#include "dmxsync.h" #include "dmxsync.h"
#ifdef DPMSExtension
#include "dpmsproc.h" #include "dpmsproc.h"
#endif
#include "windowstr.h" /* For screenIsSaved */ #include "windowstr.h" /* For screenIsSaved */
#include "X11/extensions/dpms.h" #include "X11/extensions/dpms.h"
@ -64,7 +66,9 @@ static void _dmxDPMSInit(DMXScreenInfo *dmxScreen)
dpmsGeneration = serverGeneration; dpmsGeneration = serverGeneration;
} }
#ifdef DPMSExtension
if (DPMSDisabledSwitch) dpmsSupported = FALSE; /* -dpms turns off */ if (DPMSDisabledSwitch) dpmsSupported = FALSE; /* -dpms turns off */
#endif
dmxScreen->dpmsCapable = 0; 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 $ */ /* $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) { if (conf_ext && conf_ext->ext_option_lst) {
for (o = conf_ext->ext_option_lst; o; o = xf86NextOption(o)) { for (o = conf_ext->ext_option_lst; o; o = xf86NextOption(o)) {
char *name = xf86OptionName(o); char *name = xf86OptionName(o);
char *val = xf86OptionValue(o); char *val = xf86OptionValue(o);
if (xf86NameCmp(val, "enable") == 0) { char *n;
if (EnableDisableExtension(name, TRUE)) { Bool enable = TRUE;
xf86Msg(X_CONFIG, "Extension \"%s\" is enabled\n", name);
} else { /* Handle "No<ExtensionName>" */
xf86Msg(X_ERROR, n = xf86NormalizeName(name);
"Extension \"%s\" is unrecognized\n", name); if (strncmp(n, "no", 2) == 0) {
return FALSE; name += 2;
} enable = FALSE;
} else if (xf86NameCmp(val, "disable") == 0) { }
if (EnableDisableExtension(name, FALSE)) {
xf86Msg(X_CONFIG, "Extension \"%s\" is disabled\n", name); if (!val ||
} else { xf86NameCmp(val, "enable") == 0 ||
xf86Msg(X_ERROR, xf86NameCmp(val, "on") == 0 ||
"Extension \"%s\" is unrecognized\n", name); xf86NameCmp(val, "1") == 0 ||
return FALSE; 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 { } else {
xf86Msg(X_ERROR, xf86Msg(X_ERROR,
"%s is not a valid value for the Extension option\n", "%s is not a valid value for the Extension option\n",
val); val);
return FALSE; 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 /* $XFree86: xc/programs/Xserver/hw/xfree86/loader/dixsym.c,v 1.63 2003/12/03
* 17:11:29 tsi Exp $ */ * 17:11:29 tsi Exp $ */
@ -198,6 +198,7 @@ LOOKUP dixLookupTab[] = {
SYMFUNC(VerifyRectOrder) SYMFUNC(VerifyRectOrder)
SYMFUNC(SetDashes) SYMFUNC(SetDashes)
/* globals.c */ /* globals.c */
#ifdef DPMSExtension
SYMVAR(DPMSEnabled) SYMVAR(DPMSEnabled)
SYMVAR(DPMSCapableFlag) SYMVAR(DPMSCapableFlag)
SYMVAR(DPMSOffTime) SYMVAR(DPMSOffTime)
@ -207,6 +208,7 @@ LOOKUP dixLookupTab[] = {
SYMVAR(DPMSEnabledSwitch) SYMVAR(DPMSEnabledSwitch)
SYMVAR(DPMSDisabledSwitch) SYMVAR(DPMSDisabledSwitch)
SYMVAR(defaultDPMSEnabled) SYMVAR(defaultDPMSEnabled)
#endif
/* bigreq */ /* bigreq */
SYMVAR(maxBigRequestSize) SYMVAR(maxBigRequestSize)
#ifdef XV #ifdef XV
@ -345,7 +347,9 @@ LOOKUP dixLookupTab[] = {
SYMFUNC(TimerFree) SYMFUNC(TimerFree)
SYMFUNC(TimerSet) SYMFUNC(TimerSet)
SYMFUNC(TimerCancel) SYMFUNC(TimerCancel)
#ifdef DPMSExtension
SYMFUNC(SetDPMSTimers) SYMFUNC(SetDPMSTimers)
#endif
/* io.c */ /* io.c */
SYMFUNC(WriteToClient) SYMFUNC(WriteToClient)
SYMFUNC(SetCriticalOutputPending) SYMFUNC(SetCriticalOutputPending)

View File

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