[PATCH 33/37] Add localOnly argument to AddExtension

Daniel Stone daniel at fooishbar.org
Tue Jun 28 12:27:49 PDT 2011


Does what it says on the box (or will, next commit): specifies if the
extension should be enabled for local clients only.  Marked SHM, DRI and
DRI2 as the only extensions requiring local clients.

Signed-off-by: Daniel Stone <daniel at fooishbar.org>
---
 Xext/bigreq.c                 |    2 +-
 Xext/dpms.c                   |    2 +-
 Xext/geext.c                  |    2 +-
 Xext/panoramiX.c              |    2 +-
 Xext/saver.c                  |    2 +-
 Xext/security.c               |    2 +-
 Xext/shape.c                  |    2 +-
 Xext/shm.c                    |    2 +-
 Xext/sync.c                   |    2 +-
 Xext/xcmisc.c                 |    2 +-
 Xext/xf86bigfont.c            |    2 +-
 Xext/xres.c                   |    2 +-
 Xext/xselinux_ext.c           |    2 +-
 Xext/xtest.c                  |    2 +-
 Xext/xvmain.c                 |    2 +-
 Xext/xvmc.c                   |    2 +-
 Xi/extinit.c                  |    3 ++-
 composite/compext.c           |    2 +-
 damageext/damageext.c         |    3 ++-
 dbe/dbe.c                     |    2 +-
 dix/extension.c               |    3 ++-
 doc/Xserver-spec.xml          |    4 +++-
 glx/glxext.c                  |    2 +-
 hw/dmx/dmx.c                  |    2 +-
 hw/dmx/glxProxy/glxext.c      |    2 +-
 hw/kdrive/ephyr/ephyrdriext.c |    3 ++-
 hw/xfree86/common/xf86DGA.c   |    3 ++-
 hw/xfree86/common/xf86vmode.c |    3 ++-
 hw/xfree86/dri/xf86dri.c      |    3 ++-
 hw/xfree86/dri2/dri2ext.c     |    3 ++-
 hw/xquartz/applewm.c          |    3 ++-
 hw/xquartz/pseudoramiX.c      |    3 ++-
 hw/xquartz/xpr/appledri.c     |    3 ++-
 hw/xwin/winwindowswm.c        |    3 ++-
 include/extnsionst.h          |    4 +++-
 randr/randr.c                 |    2 +-
 randr/rrxinerama.c            |    3 ++-
 record/record.c               |    3 ++-
 render/render.c               |    2 +-
 xfixes/xfixes.c               |    3 ++-
 xkb/xkb.c                     |    3 ++-
 41 files changed, 61 insertions(+), 41 deletions(-)

diff --git a/Xext/bigreq.c b/Xext/bigreq.c
index 2a3becd..9c1e73a 100644
--- a/Xext/bigreq.c
+++ b/Xext/bigreq.c
@@ -73,5 +73,5 @@ BigReqExtensionInit(void)
 {
     AddExtension(XBigReqExtensionName, 0, 0,
 		 ProcBigReqDispatch, ProcBigReqDispatch,
-		 NULL, StandardMinorOpcode);
+		 NULL, StandardMinorOpcode, FALSE);
 }
diff --git a/Xext/dpms.c b/Xext/dpms.c
index 2eb28ef..af97a76 100644
--- a/Xext/dpms.c
+++ b/Xext/dpms.c
@@ -376,5 +376,5 @@ DPMSExtensionInit(void)
 {
     AddExtension(DPMSExtensionName, 0, 0,
 		 ProcDPMSDispatch, SProcDPMSDispatch,
-		 NULL, StandardMinorOpcode);
+		 NULL, StandardMinorOpcode, FALSE);
 }
diff --git a/Xext/geext.c b/Xext/geext.c
index 18f8ffe..9a2d3ef 100644
--- a/Xext/geext.c
+++ b/Xext/geext.c
@@ -216,7 +216,7 @@ GEExtensionInit(void)
     if((extEntry = AddExtension(GE_NAME,
                         0, GENumberErrors,
                         ProcGEDispatch, SProcGEDispatch,
-                        GEResetProc, StandardMinorOpcode)) != 0)
+                        GEResetProc, StandardMinorOpcode, FALSE)) != 0)
     {
         memset(GEExtensions, 0, sizeof(GEExtensions));
 
diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index 277b637..2921450 100644
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@ -470,7 +470,7 @@ void PanoramiXExtensionInit(void)
 	extEntry = AddExtension(PANORAMIX_PROTOCOL_NAME, 0,0, 
 				ProcPanoramiXDispatch,
 				SProcPanoramiXDispatch, PanoramiXResetProc, 
-				StandardMinorOpcode);
+				StandardMinorOpcode, FALSE);
 	if (!extEntry)
 	    break;
 
diff --git a/Xext/saver.c b/Xext/saver.c
index 0544506..54881bc 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -1505,7 +1505,7 @@ ScreenSaverExtensionInit(void)
     if (AttrType && SaverEventType && SuspendType &&
 	(extEntry = AddExtension(ScreenSaverName, ScreenSaverNumberEvents, 0,
 				 ProcScreenSaverDispatch, SProcScreenSaverDispatch,
-				 NULL, StandardMinorOpcode)))
+				 NULL, StandardMinorOpcode, FALSE)))
     {
 	ScreenSaverEventBase = extEntry->eventBase;
 	EventSwapVector[ScreenSaverEventBase] = (EventSwapPtr) SScreenSaverNotifyEvent;
diff --git a/Xext/security.c b/Xext/security.c
index 5e0a734..55407f0 100644
--- a/Xext/security.c
+++ b/Xext/security.c
@@ -1130,7 +1130,7 @@ SecurityExtensionInit(void)
     extEntry = AddExtension(SECURITY_EXTENSION_NAME,
 			    XSecurityNumberEvents, XSecurityNumberErrors,
 			    ProcSecurityDispatch, SProcSecurityDispatch,
-                            SecurityResetProc, StandardMinorOpcode);
+                            SecurityResetProc, StandardMinorOpcode, FALSE);
 
     SecurityErrorBase = extEntry->errorBase;
     SecurityEventBase = extEntry->eventBase;
diff --git a/Xext/shape.c b/Xext/shape.c
index 5f471d3..3c2e1e9 100644
--- a/Xext/shape.c
+++ b/Xext/shape.c
@@ -1251,7 +1251,7 @@ ShapeExtensionInit(void)
     if (ClientType && ShapeEventType &&
 	(extEntry = AddExtension(SHAPENAME, ShapeNumberEvents, 0,
 				 ProcShapeDispatch, SProcShapeDispatch,
-				 NULL, StandardMinorOpcode)))
+				 NULL, StandardMinorOpcode, FALSE)))
     {
 	ShapeEventBase = extEntry->eventBase;
 	EventSwapVector[ShapeEventBase] = (EventSwapPtr) SShapeNotifyEvent;
diff --git a/Xext/shm.c b/Xext/shm.c
index 09371f0..1ff4224 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -1313,7 +1313,7 @@ ShmExtensionInit(void)
     if (ShmSegType &&
 	(extEntry = AddExtension(SHMNAME, ShmNumberEvents, ShmNumberErrors,
 				 ProcShmDispatch, SProcShmDispatch,
-				 ShmResetProc, StandardMinorOpcode)))
+				 ShmResetProc, StandardMinorOpcode, TRUE)))
     {
 	ShmReqCode = (unsigned char)extEntry->base;
 	ShmCompletionCode = extEntry->eventBase;
diff --git a/Xext/sync.c b/Xext/sync.c
index 8f604d5..c9534f7 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -2635,7 +2635,7 @@ SyncExtensionInit(void)
 				 XSyncNumberEvents, XSyncNumberErrors,
 				 ProcSyncDispatch, SProcSyncDispatch,
 				 SyncResetProc,
-				 StandardMinorOpcode)) == NULL)
+				 StandardMinorOpcode, FALSE)) == NULL)
     {
 	ErrorF("Sync Extension %d.%d failed to Initialise\n",
 		SYNC_MAJOR_VERSION, SYNC_MINOR_VERSION);
diff --git a/Xext/xcmisc.c b/Xext/xcmisc.c
index 9357941..23530ad 100644
--- a/Xext/xcmisc.c
+++ b/Xext/xcmisc.c
@@ -203,5 +203,5 @@ XCMiscExtensionInit(void)
 {
     AddExtension(XCMiscExtensionName, 0, 0,
 		 ProcXCMiscDispatch, SProcXCMiscDispatch,
-		 NULL, StandardMinorOpcode);
+		 NULL, StandardMinorOpcode, FALSE);
 }
diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c
index de82744..4fb1db4 100644
--- a/Xext/xf86bigfont.c
+++ b/Xext/xf86bigfont.c
@@ -714,7 +714,7 @@ XFree86BigfontExtensionInit(void)
 		     ProcXF86BigfontDispatch,
 		     SProcXF86BigfontDispatch,
 		     XF86BigfontResetProc,
-		     StandardMinorOpcode)) {
+		     StandardMinorOpcode, FALSE)) {
 #ifdef HAS_SHM
 #ifdef MUST_CHECK_FOR_SHM_SYSCALL
 	/*
diff --git a/Xext/xres.c b/Xext/xres.c
index 653f140..2be92a6 100644
--- a/Xext/xres.c
+++ b/Xext/xres.c
@@ -380,5 +380,5 @@ ResExtensionInit(void)
 {
     (void) AddExtension(XRES_NAME, 0, 0,
                             ProcResDispatch, SProcResDispatch,
-                            NULL, StandardMinorOpcode);
+                            NULL, StandardMinorOpcode, FALSE);
 }
diff --git a/Xext/xselinux_ext.c b/Xext/xselinux_ext.c
index 45f3c11..a17772a 100644
--- a/Xext/xselinux_ext.c
+++ b/Xext/xselinux_ext.c
@@ -725,7 +725,7 @@ SELinuxExtensionInit(void)
     extEntry = AddExtension(SELINUX_EXTENSION_NAME,
 			    SELinuxNumberEvents, SELinuxNumberErrors,
 			    ProcSELinuxDispatch, SProcSELinuxDispatch,
-			    SELinuxResetProc, StandardMinorOpcode);
+			    SELinuxResetProc, StandardMinorOpcode, FALSE);
 
     AddExtensionAlias("Flask", extEntry);
 }
diff --git a/Xext/xtest.c b/Xext/xtest.c
index 510261a..65222a7 100644
--- a/Xext/xtest.c
+++ b/Xext/xtest.c
@@ -684,7 +684,7 @@ XTestExtensionInit(void)
 {
     AddExtension(XTestExtensionName, 0, 0,
             ProcXTestDispatch, SProcXTestDispatch,
-            NULL, StandardMinorOpcode);
+            NULL, StandardMinorOpcode, FALSE);
 
     xtest_evlist = InitEventList(GetMaximumEventsNum());
 }
diff --git a/Xext/xvmain.c b/Xext/xvmain.c
index d21a56c..e38fed4 100644
--- a/Xext/xvmain.c
+++ b/Xext/xvmain.c
@@ -178,7 +178,7 @@ XvExtensionInit(void)
 
       extEntry = AddExtension(XvName, XvNumEvents, XvNumErrors, 
 			      ProcXvDispatch, SProcXvDispatch,
-			      XvResetProc, StandardMinorOpcode);
+			      XvResetProc, StandardMinorOpcode, FALSE);
       if (!extEntry) 
 	{
 	  FatalError("XvExtensionInit: AddExtensions failed\n");
diff --git a/Xext/xvmc.c b/Xext/xvmc.c
index 4d29941..8a269b0 100644
--- a/Xext/xvmc.c
+++ b/Xext/xvmc.c
@@ -685,7 +685,7 @@ XvMCExtensionInit(void)
 
    extEntry = AddExtension(XvMCName, XvMCNumEvents, XvMCNumErrors, 
                               ProcXvMCDispatch, SProcXvMCDispatch,
-                              NULL, StandardMinorOpcode);
+                              NULL, StandardMinorOpcode, FALSE);
 
    if(!extEntry) return;
   
diff --git a/Xi/extinit.c b/Xi/extinit.c
index 1e30b3c..167ce93 100644
--- a/Xi/extinit.c
+++ b/Xi/extinit.c
@@ -1258,7 +1258,8 @@ XInputExtensionInit(void)
         FatalError("Failed to add callback to XI.\n");
 
     extEntry = AddExtension(INAME, IEVENTS, IERRORS, ProcIDispatch,
-			    SProcIDispatch, IResetProc, StandardMinorOpcode);
+			    SProcIDispatch, IResetProc, StandardMinorOpcode,
+			    FALSE);
     if (extEntry) {
 	IReqCode = extEntry->base;
 	IEventBase = extEntry->eventBase;
diff --git a/composite/compext.c b/composite/compext.c
index e0d8e75..b2ee29f 100644
--- a/composite/compext.c
+++ b/composite/compext.c
@@ -564,7 +564,7 @@ CompositeExtensionInit (void)
 
     extEntry = AddExtension (COMPOSITE_NAME, 0, 0,
 			     ProcCompositeDispatch, SProcCompositeDispatch,
-			     NULL, StandardMinorOpcode);
+			     NULL, StandardMinorOpcode, FALSE);
     if (!extEntry)
 	return;
     CompositeReqCode = (CARD8) extEntry->base;
diff --git a/damageext/damageext.c b/damageext/damageext.c
index 02db88a..8528d14 100644
--- a/damageext/damageext.c
+++ b/damageext/damageext.c
@@ -510,7 +510,8 @@ DamageExtensionInit(void)
     if ((extEntry = AddExtension(DAMAGE_NAME, XDamageNumberEvents, 
 				 XDamageNumberErrors,
 				 ProcDamageDispatch, SProcDamageDispatch,
-				 DamageResetProc, StandardMinorOpcode)) != 0)
+				 DamageResetProc, StandardMinorOpcode,
+				 FALSE)) != 0)
     {
 	DamageReqCode = (unsigned char)extEntry->base;
 	DamageEventBase = extEntry->eventBase;
diff --git a/dbe/dbe.c b/dbe/dbe.c
index 51bbdc6..22c180e 100644
--- a/dbe/dbe.c
+++ b/dbe/dbe.c
@@ -1648,7 +1648,7 @@ DbeExtensionInit(void)
     /* Now add the extension. */
     extEntry = AddExtension(DBE_PROTOCOL_NAME, DbeNumberEvents, 
                             DbeNumberErrors, ProcDbeDispatch, SProcDbeDispatch,
-                            DbeResetProc, StandardMinorOpcode);
+                            DbeResetProc, StandardMinorOpcode, FALSE);
 
     dbeErrorBase = extEntry->errorBase;
     SetResourceTypeErrorValue(dbeWindowPrivResType, dbeErrorBase + DbeBadBuffer);
diff --git a/dix/extension.c b/dix/extension.c
index c7bbac5..0fa177a 100644
--- a/dix/extension.c
+++ b/dix/extension.c
@@ -75,7 +75,7 @@ AddExtension(char *name, int NumEvents, int NumErrors,
 	     int (*MainProc)(ClientPtr c1), 
 	     int (*SwappedMainProc)(ClientPtr c2), 
 	     void (*CloseDownProc)(ExtensionEntry *e), 
-	     unsigned short (*MinorOpcodeProc)(ClientPtr c3))
+	     unsigned short (*MinorOpcodeProc)(ClientPtr c3), Bool localOnly)
 {
     int i;
     ExtensionEntry *ext, **newexts;
@@ -122,6 +122,7 @@ AddExtension(char *name, int NumEvents, int NumErrors,
     ext->base = i + EXTENSION_BASE;
     ext->CloseDown = CloseDownProc;
     ext->MinorOpcode = MinorOpcodeProc;
+    ext->localOnly = localOnly;
     ProcVector[i + EXTENSION_BASE] = MainProc;
     SwappedProcVector[i + EXTENSION_BASE] = SwappedMainProc;
     if (NumEvents)
diff --git a/doc/Xserver-spec.xml b/doc/Xserver-spec.xml
index 7d7f915..895f28e 100644
--- a/doc/Xserver-spec.xml
+++ b/doc/Xserver-spec.xml
@@ -569,6 +569,7 @@ should be called by InitExtensions.
 		int (* SwappedMainProc)(ClientPtr);/*Called if client differs from server*/
 		void (* CloseDownProc)(ExtensionEntry *);
 		unsigned short (*MinorOpcodeProc)(ClientPtr);
+                Bool localOnly;
 
 </programlisting></blockquote>
 name is the name used by clients to refer to the extension.  NumEvents is the
@@ -580,7 +581,8 @@ CloseDownProc is called at server reset time to deallocate any private
 storage used by the extension.  MinorOpcodeProc is used by DIX to place the
 appropriate value into errors.  The DIX routine StandardMinorOpcode can be
 used here which takes the minor opcode from the normal place in the request
-(i.e. just after the major opcode).</para>
+(i.e. just after the major opcode).  If localOnly is true, this extension
+will not be reported to or accessible by remote clients.</para>
 </section>
 <section>
   <title>Macros and Other Helpers</title>
diff --git a/glx/glxext.c b/glx/glxext.c
index 9cfc096..7c53829 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -353,7 +353,7 @@ void GlxExtensionInit(void)
     extEntry = AddExtension(GLX_EXTENSION_NAME, __GLX_NUMBER_EVENTS,
 			    __GLX_NUMBER_ERRORS, __glXDispatch,
 			    __glXDispatch, ResetExtension,
-			    StandardMinorOpcode);
+			    StandardMinorOpcode, FALSE);
     if (!extEntry) {
 	FatalError("__glXExtensionInit: AddExtensions failed\n");
 	return;
diff --git a/hw/dmx/dmx.c b/hw/dmx/dmx.c
index f3e41ac..ec2584f 100644
--- a/hw/dmx/dmx.c
+++ b/hw/dmx/dmx.c
@@ -1092,6 +1092,6 @@ void DMXExtensionInit(void)
     
     if ((extEntry = AddExtension(DMX_EXTENSION_NAME, 0, 0,
                                  ProcDMXDispatch, SProcDMXDispatch,
-                                 NULL, StandardMinorOpcode)))
+                                 NULL, StandardMinorOpcode, FALSE)))
 	DMXCode = extEntry->base;
 }
diff --git a/hw/dmx/glxProxy/glxext.c b/hw/dmx/glxProxy/glxext.c
index 7f63b6b..0a97b80 100644
--- a/hw/dmx/glxProxy/glxext.c
+++ b/hw/dmx/glxProxy/glxext.c
@@ -318,7 +318,7 @@ void GlxExtensionInit(void)
     extEntry = AddExtension(GLX_EXTENSION_NAME, __GLX_NUMBER_EVENTS,
 			    __GLX_NUMBER_ERRORS, __glXDispatch,
 			    __glXSwapDispatch, ResetExtension,
-			    StandardMinorOpcode);
+			    StandardMinorOpcode, FALSE);
     if (!extEntry) {
 	FatalError("__glXExtensionInit: AddExtensions failed\n");
 	return;
diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c
index 6945f5b..38335c4 100644
--- a/hw/kdrive/ephyr/ephyrdriext.c
+++ b/hw/kdrive/ephyr/ephyrdriext.c
@@ -1387,7 +1387,8 @@ ephyrDRIExtensionInit (ScreenPtr a_screen)
 				 ProcXF86DRIDispatch,
 				 SProcXF86DRIDispatch,
 				 NULL,
-				 StandardMinorOpcode))) {
+				 StandardMinorOpcode,
+				 TRUE))) {
 	DRIReqCode = (unsigned char)extEntry->base;
 	DRIErrorBase = extEntry->errorBase;
     } else {
diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c
index cb78c6f..1661106 100644
--- a/hw/xfree86/common/xf86DGA.c
+++ b/hw/xfree86/common/xf86DGA.c
@@ -2225,7 +2225,8 @@ XFree86DGAExtensionInit(void)
 				ProcXDGADispatch,
 				SProcXDGADispatch,
 				XDGAResetProc,
-				StandardMinorOpcode))) {
+				StandardMinorOpcode,
+				TRUE))) {
 	int i;
 
 	DGAReqCode = (unsigned char)extEntry->base;
diff --git a/hw/xfree86/common/xf86vmode.c b/hw/xfree86/common/xf86vmode.c
index 4737f2d..8650031 100644
--- a/hw/xfree86/common/xf86vmode.c
+++ b/hw/xfree86/common/xf86vmode.c
@@ -2113,7 +2113,8 @@ XFree86VidModeExtensionInit(void)
 				ProcXF86VidModeDispatch,
 				SProcXF86VidModeDispatch,
 				NULL,
-				StandardMinorOpcode))) {
+				StandardMinorOpcode,
+				FALSE))) {
 #if 0
 	XF86VidModeReqCode = (unsigned char)extEntry->base;
 #endif
diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c
index e02644a..740c83b 100644
--- a/hw/xfree86/dri/xf86dri.c
+++ b/hw/xfree86/dri/xf86dri.c
@@ -655,7 +655,8 @@ XFree86DRIExtensionInit(void)
 				 ProcXF86DRIDispatch,
 				 SProcXF86DRIDispatch,
 				 XF86DRIResetProc,
-				 StandardMinorOpcode))) {
+				 StandardMinorOpcode,
+				 TRUE))) {
 	DRIReqCode = (unsigned char)extEntry->base;
 	DRIErrorBase = extEntry->errorBase;
     }
diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c
index 13822fd..2734748 100644
--- a/hw/xfree86/dri2/dri2ext.c
+++ b/hw/xfree86/dri2/dri2ext.c
@@ -641,7 +641,8 @@ DRI2ExtensionInit(void)
 				 ProcDRI2Dispatch,
 				 SProcDRI2Dispatch,
 				 NULL,
-				 StandardMinorOpcode);
+				 StandardMinorOpcode,
+				 TRUE);
 
     DRI2EventBase = dri2Extension->eventBase;
 }
diff --git a/hw/xquartz/applewm.c b/hw/xquartz/applewm.c
index 2f26e61..6aa6421 100644
--- a/hw/xquartz/applewm.c
+++ b/hw/xquartz/applewm.c
@@ -725,7 +725,8 @@ AppleWMExtensionInit(
                                  ProcAppleWMDispatch,
                                  SProcAppleWMDispatch,
                                  NULL,
-                                 StandardMinorOpcode)))
+                                 StandardMinorOpcode,
+                                 FALSE)))
     {
         WMReqCode = (unsigned char)extEntry->base;
         WMErrorBase = extEntry->errorBase;
diff --git a/hw/xquartz/pseudoramiX.c b/hw/xquartz/pseudoramiX.c
index 298ec2b..8b67d47 100644
--- a/hw/xquartz/pseudoramiX.c
+++ b/hw/xquartz/pseudoramiX.c
@@ -135,7 +135,8 @@ void PseudoramiXExtensionInit(int argc, char *argv[])
                                 ProcPseudoramiXDispatch,
                                 SProcPseudoramiXDispatch,
                                 PseudoramiXResetProc,
-                                StandardMinorOpcode);
+                                StandardMinorOpcode,
+                                FALSE);
         if (!extEntry) {
             ErrorF("PseudoramiXExtensionInit(): AddExtension failed\n");
         } else {
diff --git a/hw/xquartz/xpr/appledri.c b/hw/xquartz/xpr/appledri.c
index ff70a38..8149cd1 100644
--- a/hw/xquartz/xpr/appledri.c
+++ b/hw/xquartz/xpr/appledri.c
@@ -411,7 +411,8 @@ AppleDRIExtensionInit(void)
                                  ProcAppleDRIDispatch,
                                  SProcAppleDRIDispatch,
                                  AppleDRIResetProc,
-                                 StandardMinorOpcode))) {
+                                 StandardMinorOpcode,
+                                 TRUE))) {
         DRIReqCode = (unsigned char)extEntry->base;
         DRIErrorBase = extEntry->errorBase;
         DRIEventBase = extEntry->eventBase;
diff --git a/hw/xwin/winwindowswm.c b/hw/xwin/winwindowswm.c
index 7138409..242a275 100644
--- a/hw/xwin/winwindowswm.c
+++ b/hw/xwin/winwindowswm.c
@@ -627,7 +627,8 @@ winWindowsWMExtensionInit (void)
 			       ProcWindowsWMDispatch,
 			       SProcWindowsWMDispatch,
 			       NULL,
-			       StandardMinorOpcode)))
+			       StandardMinorOpcode,
+			       TRUE)))
     {
       WMReqCode = (unsigned char)extEntry->base;
       WMErrorBase = extEntry->errorBase;
diff --git a/include/extnsionst.h b/include/extnsionst.h
index bb66dfb..7b08164 100644
--- a/include/extnsionst.h
+++ b/include/extnsionst.h
@@ -68,6 +68,7 @@ typedef struct _ExtensionEntry {
     int num_aliases;
     char **aliases;
     pointer extPrivate;
+    Bool localOnly;
     unsigned short (* MinorOpcode)(	/* called for errors */
 	ClientPtr /* client */);
     PrivateRec *devPrivates;
@@ -98,7 +99,8 @@ extern _X_EXPORT ExtensionEntry *AddExtension(
     int (* /*MainProc*/)(ClientPtr /*client*/),
     int (* /*SwappedMainProc*/)(ClientPtr /*client*/),
     void (* /*CloseDownProc*/)(ExtensionEntry * /*extension*/),
-    unsigned short (* /*MinorOpcodeProc*/)(ClientPtr /*client*/)
+    unsigned short (* /*MinorOpcodeProc*/)(ClientPtr /*client*/),
+    Bool localOnly
 );
 
 extern _X_EXPORT Bool AddExtensionAlias(
diff --git a/randr/randr.c b/randr/randr.c
index d337129..39fc08c 100644
--- a/randr/randr.c
+++ b/randr/randr.c
@@ -347,7 +347,7 @@ RRExtensionInit (void)
 	return;
     extEntry = AddExtension (RANDR_NAME, RRNumberEvents, RRNumberErrors,
 			     ProcRRDispatch, SProcRRDispatch,
-			     NULL, StandardMinorOpcode);
+			     NULL, StandardMinorOpcode, FALSE);
     if (!extEntry)
 	return;
     RRErrorBase = extEntry->errorBase;
diff --git a/randr/rrxinerama.c b/randr/rrxinerama.c
index c1bd5bb..976771f 100644
--- a/randr/rrxinerama.c
+++ b/randr/rrxinerama.c
@@ -472,5 +472,6 @@ RRXineramaExtensionInit(void)
 			ProcRRXineramaDispatch,
 			SProcRRXineramaDispatch,
 			NULL,
-			StandardMinorOpcode);
+			StandardMinorOpcode,
+			FALSE);
 }
diff --git a/record/record.c b/record/record.c
index 69fca72..2f3da14 100644
--- a/record/record.c
+++ b/record/record.c
@@ -2924,7 +2924,8 @@ RecordExtensionInit(void)
 
     extentry = AddExtension(RECORD_NAME, RecordNumEvents, RecordNumErrors,
 			    ProcRecordDispatch, SProcRecordDispatch,
-			    RecordCloseDown, StandardMinorOpcode);
+			    RecordCloseDown, StandardMinorOpcode,
+			    FALSE);
     if (!extentry)
     {
 	DeleteCallback(&ClientStateCallback, RecordAClientStateChange, NULL);
diff --git a/render/render.c b/render/render.c
index ebb1d63..11b05ac 100644
--- a/render/render.c
+++ b/render/render.c
@@ -258,7 +258,7 @@ RenderExtensionInit (void)
 
     extEntry = AddExtension (RENDER_NAME, 0, RenderNumberErrors,
 			     ProcRenderDispatch, SProcRenderDispatch,
-			     NULL, StandardMinorOpcode);
+			     NULL, StandardMinorOpcode, FALSE);
     if (!extEntry)
 	return;
     RenderErrBase = extEntry->errorBase;
diff --git a/xfixes/xfixes.c b/xfixes/xfixes.c
index e0ebedd..9d9880d 100644
--- a/xfixes/xfixes.c
+++ b/xfixes/xfixes.c
@@ -254,7 +254,8 @@ XFixesExtensionInit(void)
 	(extEntry = AddExtension(XFIXES_NAME, XFixesNumberEvents, 
 				 XFixesNumberErrors,
 				 ProcXFixesDispatch, SProcXFixesDispatch,
-				 XFixesResetProc, StandardMinorOpcode)) != 0)
+				 XFixesResetProc, StandardMinorOpcode,
+				 FALSE)) != 0)
     {
 	XFixesReqCode = (unsigned char)extEntry->base;
 	XFixesEventBase = extEntry->eventBase;
diff --git a/xkb/xkb.c b/xkb/xkb.c
index 86231a8..8f0e967 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -6733,7 +6733,8 @@ XkbExtensionInit(void)
 
     if ((extEntry = AddExtension(XkbName, XkbNumberEvents, XkbNumberErrors,
 				 ProcXkbDispatch, SProcXkbDispatch,
-				 NULL, StandardMinorOpcode))) {
+				 NULL, StandardMinorOpcode,
+				 FALSE))) {
 	XkbReqCode = (unsigned char)extEntry->base;
 	XkbEventBase = (unsigned char)extEntry->eventBase;
 	XkbErrorBase = (unsigned char)extEntry->errorBase;
-- 
1.7.5.4



More information about the xorg-devel mailing list