xserver: Branch 'master' - 6 commits

Keith Packard keithp at kemper.freedesktop.org
Tue Nov 27 16:09:41 PST 2012


 hw/dmx/dmx.h                       |    2 ++
 hw/dmx/dmxinit.c                   |   22 +++++++++++++++++++++-
 hw/kdrive/ephyr/hostx.c            |    4 +++-
 hw/vfb/InitOutput.c                |   19 +++++++++++++++++++
 hw/xfree86/common/xf86Extensions.c |    2 +-
 hw/xfree86/dixmods/glxmodule.c     |    2 +-
 hw/xquartz/quartz.c                |    2 +-
 include/extension.h                |    2 +-
 include/extinit.h                  |    4 ----
 mi/miinitext.c                     |    2 +-
 10 files changed, 50 insertions(+), 11 deletions(-)

New commits:
commit d50a94568e06a06df682a0028579d37a7b209d15
Merge: 87b60ef... cf05db8...
Author: Keith Packard <keithp at keithp.com>
Date:   Tue Nov 27 15:14:26 2012 -0800

    Merge remote-tracking branch 'daniels/master'

commit cf05db8ddec948d907915e1c9569d743e8771def
Author: Sjoerd Simons <sjoerd.simons at collabora.co.uk>
Date:   Tue Oct 30 17:02:58 2012 +0100

    Ephyr: Find the right host screen when embedded
    
    When Xephyr is embedded into another application (e.g. in xoo), the
    input events may come from the parent Window instead of our own. So make
    sure we find the host screen in that case as well instead of crashing.
    
    Signed-off-by: Sjoerd Simons <sjoerd.simons at collabora.co.uk>
    Reviewed-by: Daniel Stone <daniel at fooishbar.org>

diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index 02729d6..157ac36 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -881,7 +881,9 @@ host_screen_from_window(Window w)
     struct EphyrHostScreen *result = NULL;
 
     for (index = 0; index < HostX.n_screens; index++) {
-        if (HostX.screens[index].win == w || HostX.screens[index].peer_win == w) {
+        if (HostX.screens[index].win == w
+            || HostX.screens[index].peer_win == w
+            || HostX.screens[index].win_pre_existing == w) {
             result = &HostX.screens[index];
             goto out;
         }
commit ac1a60e7b6f06fd075cc5bf55d6bc67206a01d29
Author: Raphael Kubo da Costa <raphael.kubo.da.costa at intel.com>
Date:   Fri Nov 16 19:51:58 2012 +0200

    vfb: Initialize the GLX extension again.
    
    This should fix a regression in the 1.13.0 release: commit
    5f5bbbe543f65c48ecbb5cce80116a86ca3fbe86 removed a code path used by Xvfb
    and made it use the default one when initializing extensions. However, this
    meant the GLX extension was not initialized anymore since it is not part of
    the `staticExtensions' array.
    
    Since it is not possible to just add it to that array after commit
    aad428b8e21c77397c623b78706eb64b1fea77c9, adopt an approach similar to
    xwin's and xquartz's and initialize the extension from vfb's `InitOutput'.
    
    Signed-off-by: Raphael Kubo da Costa <raphael.kubo.da.costa at intel.com>
    Reviewed-by: Daniel Stone <daniel at fooishbar.org>

diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index 07ea8ea..97eccfd 100644
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -65,6 +65,7 @@ from The Open Group.
 #endif                          /* HAS_SHM */
 #include "dix.h"
 #include "miline.h"
+#include "glx_extinit.h"
 
 #define VFB_DEFAULT_WIDTH      1280
 #define VFB_DEFAULT_HEIGHT     1024
@@ -884,12 +885,30 @@ vfbScreenInit(ScreenPtr pScreen, int argc, char **argv)
 
 }                               /* end vfbScreenInit */
 
+static const ExtensionModule vfbExtensions[] = {
+#ifdef GLXEXT
+    { GlxExtensionInit, "GLX", &noGlxExtension },
+#endif
+};
+
+static
+void vfbExtensionInit(void)
+{
+    int i;
+
+    for (i = 0; i < ARRAY_SIZE(vfbExtensions); i++)
+        LoadExtension(&vfbExtensions[i], TRUE);
+}
+
 void
 InitOutput(ScreenInfo * screenInfo, int argc, char **argv)
 {
     int i;
     int NumFormats = 0;
 
+    if (serverGeneration == 1)
+        vfbExtensionInit();
+
     /* initialize pixmap formats */
 
     /* must have a pixmap depth to match every screen depth */
commit 353b14ea77324b3f7b3ea29d6f03618fd9916d5f
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Mon Nov 19 15:00:22 2012 +1100

    DMX: Add DMX and GLX extensions
    
    Unfortunately this also got lost in the extmod fallout, leaving the DMX
    server not exposing the DMX or GLX extensions.
    
    Signed-off-by: Daniel Stone <daniel at fooishbar.org>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/dmx/dmx.h b/hw/dmx/dmx.h
index d7c6204..f0cb044 100644
--- a/hw/dmx/dmx.h
+++ b/hw/dmx/dmx.h
@@ -407,4 +407,6 @@ extern DevPrivateKeyRec dmxGlyphSetPrivateKeyRec;
 
 #define dmxGlyphSetPrivateKey (&dmxGlyphSetPrivateKeyRec) /**< Private index for GlyphSets */
 
+void DMXExtensionInit(void);
+
 #endif                          /* DMX_H */
diff --git a/hw/dmx/dmxinit.c b/hw/dmx/dmxinit.c
index 5804353..7a50aeb 100644
--- a/hw/dmx/dmxinit.c
+++ b/hw/dmx/dmxinit.c
@@ -68,10 +68,13 @@
 #include <GL/glx.h>
 #include <GL/glxint.h>
 #include "dmx_glxvisuals.h"
+#include "glx_extinit.h"
 #include <X11/extensions/Xext.h>
 #include <X11/extensions/extutil.h>
 #endif                          /* GLXEXT */
 
+#include <X11/extensions/dmxproto.h>
+
 /* Global variables available to all Xserver/hw/dmx routines. */
 int dmxNumScreens;
 DMXScreenInfo *dmxScreens;
@@ -586,6 +589,20 @@ dmxExecHost(void)
     return buffer;
 }
 
+static void dmxAddExtensions(Bool glxSupported)
+{
+    const ExtensionModule dmxExtensions[] = {
+        { DMXExtensionInit, DMX_EXTENSION_NAME, NULL },
+#ifdef GLXEXT
+        { GlxExtensionInit, "GLX", &glxSupported },
+#endif
+    };
+    int i;
+
+    for (i = 0; i < ARRAY_SIZE(dmxExtensions); i++)
+        LoadExtension(&dmxExtensions[i], TRUE);
+}
+
 /** This routine is called in Xserver/dix/main.c from \a main(). */
 void
 InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
@@ -594,7 +611,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
     static unsigned long dmxGeneration = 0;
 
 #ifdef GLXEXT
-    Bool glxSupported = TRUE;
+    static Bool glxSupported = TRUE;
 #endif
 
     if (dmxGeneration != serverGeneration) {
@@ -725,6 +742,9 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
         glxSupported &= (dmxScreens[i].glxMajorOpcode > 0);
 #endif
 
+    if (serverGeneration == 1)
+        dmxAddExtensions(glxSupported);
+
     /* Tell dix layer about the backend displays */
     for (i = 0; i < dmxNumScreens; i++) {
 
diff --git a/include/extinit.h b/include/extinit.h
index 7f4718f..5690d7b 100644
--- a/include/extinit.h
+++ b/include/extinit.h
@@ -68,10 +68,6 @@ extern _X_EXPORT Bool noDbeExtension;
 extern void DbeExtensionInit(void);
 #endif
 
-#ifdef DMXEXT
-extern void DMXExtensionInit(void);
-#endif
-
 #if defined(DPMSExtension)
 #include <X11/extensions/dpmsconst.h>
 extern _X_EXPORT Bool noDPMSExtension;
commit 3556d43010f0a37bf30aa2e0ceee9a8bbcad311d
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Mon Nov 19 15:29:34 2012 +1100

    Constify extensions in LoadExtension users
    
    Signed-off-by: Daniel Stone <daniel at fooishbar.org>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/xfree86/common/xf86Extensions.c b/hw/xfree86/common/xf86Extensions.c
index d5309d5..f9e7916 100644
--- a/hw/xfree86/common/xf86Extensions.c
+++ b/hw/xfree86/common/xf86Extensions.c
@@ -53,7 +53,7 @@
 /*
  * DDX-specific extensions.
  */
-static ExtensionModule extensionModules[] = {
+static const ExtensionModule extensionModules[] = {
 #ifdef XF86VIDMODE
     {
 	XFree86VidModeExtensionInit,
diff --git a/hw/xfree86/dixmods/glxmodule.c b/hw/xfree86/dixmods/glxmodule.c
index c0c6114..e6bb736 100644
--- a/hw/xfree86/dixmods/glxmodule.c
+++ b/hw/xfree86/dixmods/glxmodule.c
@@ -47,7 +47,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 static MODULESETUPPROTO(glxSetup);
 
-static ExtensionModule GLXExt = {
+static const ExtensionModule GLXExt = {
     GlxExtensionInit,
     "GLX",
     &noGlxExtension
diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index 31b0e61..5b977c7 100644
--- a/hw/xquartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -145,7 +145,7 @@ QuartzSetupScreen(int index,
     return TRUE;
 }
 
-static ExtensionModule quartzExtensions[] = {
+static const ExtensionModule quartzExtensions[] = {
     /* PseudoramiX needs to be done before RandR, so
      * it is in miinitext.c until it can be reordered.
      * { PseudoramiXExtensionInit, "PseudoramiX", &noPseudoramiXExtension },
commit db83830eef38a86a471378121213162da180537d
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Mon Nov 19 15:28:07 2012 +1100

    Constify argument to LoadExtension
    
    Since we never modify it.
    
    Signed-off-by: Daniel Stone <daniel at fooishbar.org>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/include/extension.h b/include/extension.h
index 0f55d90..acc6add 100644
--- a/include/extension.h
+++ b/include/extension.h
@@ -97,6 +97,6 @@ extern _X_EXPORT void InitExtensions(int argc, char **argv);
 
 extern _X_EXPORT void CloseDownExtensions(void);
 
-extern _X_EXPORT void LoadExtension(ExtensionModule *ext, Bool external);
+extern _X_EXPORT void LoadExtension(const ExtensionModule *ext, Bool external);
 
 #endif                          /* EXTENSION_H */
diff --git a/mi/miinitext.c b/mi/miinitext.c
index d175440..369da5e 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -365,7 +365,7 @@ NewExtensionModule(void)
 }
 
 void
-LoadExtension(ExtensionModule * e, Bool builtin)
+LoadExtension(const ExtensionModule * e, Bool builtin)
 {
     ExtensionModule *newext;
 


More information about the xorg-commit mailing list