From d9df39ee2b5b462be87718046b16d30c231563ec Mon Sep 17 00:00:00 2001 From: Roland Mainz Date: Tue, 14 Sep 2004 00:51:25 +0000 Subject: Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=1361 - RFE: Allow enabling/disabling of more extensions --- mi/miinitext.c | 303 +++++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 252 insertions(+), 51 deletions(-) (limited to 'mi/miinitext.c') diff --git a/mi/miinitext.c b/mi/miinitext.c index 28f9d1532..4729f9c01 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -1,4 +1,4 @@ -/* $XdotOrg: xc/programs/Xserver/mi/miinitext.c,v 1.11 2004/08/03 05:39:19 anholt Exp $ */ +/* $XdotOrg: xc/programs/Xserver/mi/miinitext.c,v 1.12 2004/08/12 08:45:33 anholt Exp $ */ /* $XFree86: xc/programs/Xserver/mi/miinitext.c,v 3.67 2003/01/12 02:44:27 dawes Exp $ */ /*********************************************************** @@ -88,21 +88,123 @@ SOFTWARE. #undef XEVIE #endif /* PRINT_ONLY_SERVER */ -#ifdef PANORAMIX -extern Bool noPanoramiXExtension; -#endif + extern Bool noTestExtensions; -#ifdef XKB -extern Bool noXkbExtension; + +#ifdef BEZIER +extern Bool noBezierExtension; +#endif +#ifdef BIGREQS +extern Bool noBigReqExtension; +#endif +#ifdef COMPOSITE +extern Bool noCompositeExtension; +#endif +#ifdef DAMAGE +extern Bool noDamageExtension; +#endif +#ifdef DBE +extern Bool noDbeExtension; +#endif +#ifdef DPSEXT +extern Bool noDPSExtension; +#endif +#ifdef DPMSExtension +extern Bool noDPMSExtension; +#endif +#ifdef EVI +extern Bool noEVIExtension; +#endif +#ifdef FONTCACHE +extern Bool noFontCacheExtension; +#endif +#ifdef GLXEXT +extern Bool noGlxExtension; +#endif +#ifdef LBX +extern Bool noLbxExtension; +#endif +#ifdef SCREENSAVER +extern Bool noScreenSaverExtension; +#endif +#ifdef MITSHM +extern Bool noMITShmExtension; +#endif +#ifdef MITMISC +extern Bool noMITMiscExtension; +#endif +#ifdef MULTIBUFFER +extern Bool noMultibufferExtension; +#endif +#ifdef RANDR +extern Bool noRRExtension; #endif #ifdef RENDER extern Bool noRenderExtension; #endif +#ifdef SHAPE +extern Bool noShapeExtension; +#endif +#ifdef XCSECURITY +extern Bool noSecurityExtension; +#endif +#ifdef XSYNC +extern Bool noSyncExtension; +#endif +#ifdef TOGCUP +extern Bool noXcupExtension; +#endif +#ifdef PEXEXT +extern Bool noPexExtension; +#endif +#ifdef RES +extern Bool noResExtension; +#endif +#ifdef XAPPGROUP +extern Bool noXagExtension; +#endif +#ifdef XCMISC +extern Bool noXCMiscExtension; +#endif #ifdef XEVIE extern Bool noXevieExtension; #endif -#ifdef COMPOSITE -extern Bool noCompositeExtension; +#ifdef XIE +extern Bool noXie; +#endif +#ifdef XF86BIGFONT +extern Bool noXFree86BigfontExtension; +#endif +#ifdef XFreeXDGA +extern Bool noXFree86DGAExtension; +#endif +#ifdef XF86DRI +extern Bool noXFree86DRIExtension; +#endif +#ifdef XF86MISC +extern Bool noXFree86MiscExtension; +#endif +#ifdef XF86VIDMODE +extern Bool noXFree86VidModeExtension; +#endif +#ifdef XFIXES +extern Bool noXFixesExtension; +#endif +#ifdef XKB +/* |noXkbExtension| is defined in xc/programs/Xserver/xkb/xkbInit.c */ +extern Bool noXkbExtension; +#endif +#ifdef PANORAMIX +extern Bool noPanoramiXExtension; +#endif +#ifdef XINPUT +extern Bool noXInputExtension; +#endif +#ifdef XIDLE +extern Bool noXIdleExtension; +#endif +#ifdef XV +extern Bool noXvExtension; #endif #ifndef XFree86LOADER @@ -299,21 +401,118 @@ typedef struct { static ExtensionToggle ExtensionToggleList[] = { - { "XTEST", &noTestExtensions }, -#ifdef PANORAMIX - { "XINERAMA", &noPanoramiXExtension }, + /* sort order is extension name string as shown in xdpyinfo */ +#ifdef BEZIER + { "BEZIER", &noBezierExtension }, +#endif +#ifdef BIGREQS + { "BIG-REQUESTS", &noBigReqExtension }, +#endif +#ifdef COMPOSITE + { "Composite", &noCompositeExtension }, +#endif +#ifdef DAMAGE + { "DAMAGE", &noDamageExtension }, +#endif +#ifdef DBE + { "DOUBLE-BUFFER", &noDbeExtension }, +#endif +#ifdef DPSEXT + { "DPSExtension", &noDPSExtension }, +#endif +#ifdef DPMSExtension + { "DPMS", &noDPMSExtension }, +#endif +#ifdef EVI + { "Extended-Visual-Information", &noEVIExtension }, +#endif +#ifdef FONTCACHE + { "FontCache", &noFontCacheExtension }, +#endif +#ifdef GLXEXT + { "GLX", &noGlxExtension }, +#endif +#ifdef LBX + { "LBX", &noLbxExtension }, +#endif +#ifdef SCREENSAVER + { "MIT-SCREEN-SAVER", &noScreenSaverExtension }, +#endif +#ifdef MITSHM + { "MIT-SHM", &noMITShmExtension }, +#endif +#ifdef MITMISC + { "MIT-SUNDRY-NONSTANDARD", &noMITMiscExtension }, +#endif +#ifdef MULTIBUFFER + { "Multi-Buffering", &noMultibufferExtension }, +#endif +#ifdef RANDR + { "RANDR", &noRRExtension }, #endif #ifdef RENDER { "RENDER", &noRenderExtension }, #endif -#ifdef XKB - { "XKEYBOARD", &noXkbExtension }, +#ifdef SHAPE + { "SHAPE", &noShapeExtension }, +#endif +#ifdef XCSECURITY + { "SECURITY", &noSecurityExtension }, +#endif +#ifdef XSYNC + { "SYNC", &noSyncExtension }, +#endif +#ifdef TOGCUP + { "TOG-CUP", &noXcupExtension }, +#endif +#ifdef PEXEXT + { "X3D-PEX", &noPexExtension }, +#endif +#ifdef RES + { "X-Resource", &noResExtension }, +#endif +#ifdef XAPPGROUP + { "XC-APPGROUP", &noXagExtension }, +#endif +#ifdef XCMISC + { "XC-MISC", &noXCMiscExtension }, #endif #ifdef XEVIE { "XEVIE", &noXevieExtension }, #endif -#ifdef COMPOSITE - { "Composite", &noCompositeExtension }, +#ifdef XF86BIGFONT + { "XFree86-Bigfont", &noXFree86BigfontExtension }, +#endif +#ifdef XFreeXDGA + { "XFree86-DGA", &noXFree86DGAExtension }, +#endif +#ifdef XF86DRI + { "XFree86-DRI", &noXFree86DRIExtension }, +#endif +#ifdef XF86MISC + { "XFree86-Misc", &noXFree86MiscExtension }, +#endif +#ifdef XF86VIDMODE + { "XFree86-VidModeExtension", &noXFree86VidModeExtension }, +#endif +#ifdef XFIXES + { "XFIXES", &noXFixesExtension }, +#endif +#ifdef XIE + { "XIE", &noXie }, +#endif +#ifdef PANORAMIX + { "XINERAMA", &noPanoramiXExtension }, +#endif +#ifdef XINPUT + { "XInputExtension", &noXInputExtension }, +#endif +#ifdef XKB + { "XKEYBOARD", &noXkbExtension }, +#endif + { "XTEST", &noTestExtensions }, +#ifdef XV + { "XVideo", &noXvExtension }, #endif { NULL, NULL } }; @@ -357,7 +556,7 @@ InitExtensions(argc, argv) # endif #endif #ifdef BEZIER - BezierExtensionInit(); + if (!noBezierExtension) BezierExtensionInit(); #endif #ifdef XTESTEXT1 if (!noTestExtensions) XTestExtension1Init(); @@ -366,125 +565,127 @@ InitExtensions(argc, argv) ShapeExtensionInit(); #endif #ifdef MITSHM - ShmExtensionInit(); + if (!noMITShmExtension) ShmExtensionInit(); #endif #ifdef EVI - EVIExtensionInit(); + if (!noEVIExtension) EVIExtensionInit(); #endif #ifdef PEXEXT - PexExtensionInit(); + if (!noPexExtension) PexExtensionInit(); #endif #ifdef MULTIBUFFER - MultibufferExtensionInit(); + if (!noMultibufferExtension) MultibufferExtensionInit(); #endif #if defined(XINPUT) && !defined(NO_HW_ONLY_EXTS) - XInputExtensionInit(); + if (!noXInputExtension) XInputExtensionInit(); #endif #ifdef XTEST if (!noTestExtensions) XTestExtensionInit(); #endif #ifdef BIGREQS - BigReqExtensionInit(); + if (!noBigReqExtension) BigReqExtensionInit(); #endif #ifdef MITMISC - MITMiscExtensionInit(); + if (!noMITMiscExtension) MITMiscExtensionInit(); #endif #ifdef XIDLE - XIdleExtensionInit(); + if (!noXIdleExtension) XIdleExtensionInit(); #endif #ifdef XTRAP if (!noTestExtensions) DEC_XTRAPInit(); #endif #if defined(SCREENSAVER) && !defined(PRINT_ONLY_SERVER) - ScreenSaverExtensionInit (); + if (!noScreenSaverExtension) ScreenSaverExtensionInit (); #endif #ifdef XV - XvExtensionInit(); - XvMCExtensionInit(); + if (!noXvExtension) { + XvExtensionInit(); + XvMCExtensionInit(); + } #endif #ifdef XIE - XieInit(); + if (!noXie) XieInit(); #endif #ifdef XSYNC - SyncExtensionInit(); + if (!noSyncExtension) SyncExtensionInit(); #endif #if defined(XKB) && !defined(PRINT_ONLY_SERVER) && !defined(NO_HW_ONLY_EXTS) if (!noXkbExtension) XkbExtensionInit(); #endif #ifdef XCMISC - XCMiscExtensionInit(); + if (!noXCMiscExtension) XCMiscExtensionInit(); #endif #ifdef XRECORD if (!noTestExtensions) RecordExtensionInit(); #endif #ifdef LBX - LbxExtensionInit(); + if (!noLbxExtension) LbxExtensionInit(); #endif #ifdef DBE - DbeExtensionInit(); + if (!noDbeExtension) DbeExtensionInit(); #endif #ifdef XAPPGROUP - XagExtensionInit(); + if (!noXagExtension) XagExtensionInit(); #endif #ifdef XCSECURITY - SecurityExtensionInit(); + if (!noSecurityExtension) SecurityExtensionInit(); #endif #ifdef XPRINT - XpExtensionInit(); + XpExtensionInit(); /* server-specific extension, cannot be disabled */ #endif #ifdef TOGCUP - XcupExtensionInit(); + if (!noXcupExtension) XcupExtensionInit(); #endif #if defined(DPMSExtension) && !defined(NO_HW_ONLY_EXTS) - DPMSExtensionInit(); + if (!noDPMSExtension) DPMSExtensionInit(); #endif #ifdef FONTCACHE - FontCacheExtensionInit(); + if (!noFontCacheExtension) FontCacheExtensionInit(); #endif #ifdef XF86BIGFONT - XFree86BigfontExtensionInit(); + if (!noXFree86BigfontExtension) XFree86BigfontExtensionInit(); #endif #if !defined(PRINT_ONLY_SERVER) && !defined(NO_HW_ONLY_EXTS) #if defined(XF86VIDMODE) - XFree86VidModeExtensionInit(); + if (!noXFree86VidModeExtension) XFree86VidModeExtensionInit(); #endif #if defined(XF86MISC) - XFree86MiscExtensionInit(); + if (!noXFree86MiscExtension) XFree86MiscExtensionInit(); #endif #if defined(XFreeXDGA) - XFree86DGAExtensionInit(); + if (!noXFree86DGAExtension) XFree86DGAExtensionInit(); #endif #ifdef XF86DRI - XFree86DRIExtensionInit(); + if (!noXFree86DRIExtension) XFree86DRIExtensionInit(); #endif #endif #ifdef GLXEXT #ifndef __DARWIN__ - GlxExtensionInit(); + if (!noGlxExtension) GlxExtensionInit(); #else - DarwinGlxExtensionInit(); + if (!noGlxExtension) DarwinGlxExtensionInit(); #endif #endif #ifdef DPSEXT #ifndef XPRINT - DPSExtensionInit(); + if (!noDPSExtension) DPSExtensionInit(); #endif #endif #ifdef XFIXES /* must be before Render to layer DisplayCursor correctly */ - XFixesExtensionInit(); + if (!noXFixesExtension) XFixesExtensionInit(); #endif #ifdef RENDER if (!noRenderExtension) RenderExtensionInit(); #endif #ifdef RANDR - RRExtensionInit(); + if (!noRRExtension) RRExtensionInit(); #endif #ifdef RES - ResExtensionInit(); + if (!noResExtension) ResExtensionInit(); #endif #ifdef DMXEXT - DMXExtensionInit(); + DMXExtensionInit(); /* server-specific extension, cannot be disabled */ #endif #ifdef XEVIE if (!noXevieExtension) XevieExtensionInit(); @@ -493,7 +694,7 @@ InitExtensions(argc, argv) if (!noCompositeExtension) CompositeExtensionInit(); #endif #ifdef DAMAGE - DamageExtensionInit(); + if (!noDamageExtension) DamageExtensionInit(); #endif } -- cgit v1.2.3