summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-11-27 15:14:26 -0800
committerKeith Packard <keithp@keithp.com>2012-11-27 15:14:26 -0800
commitd50a94568e06a06df682a0028579d37a7b209d15 (patch)
tree8f836603f20f97600e22707ded418bda1146375f /hw
parent87b60efb859d86fd9e96306112bc5453a549fa69 (diff)
parentcf05db8ddec948d907915e1c9569d743e8771def (diff)
Merge remote-tracking branch 'daniels/master'
Diffstat (limited to 'hw')
-rw-r--r--hw/dmx/dmx.h2
-rw-r--r--hw/dmx/dmxinit.c22
-rw-r--r--hw/kdrive/ephyr/hostx.c4
-rw-r--r--hw/vfb/InitOutput.c19
-rw-r--r--hw/xfree86/common/xf86Extensions.c2
-rw-r--r--hw/xfree86/dixmods/glxmodule.c2
-rw-r--r--hw/xquartz/quartz.c2
7 files changed, 48 insertions, 5 deletions
diff --git a/hw/dmx/dmx.h b/hw/dmx/dmx.h
index d7c620467..f0cb04459 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 5804353fb..7a50aebc3 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/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index 02729d6f6..157ac36b2 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;
}
diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index 07ea8ea93..97eccfd4e 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 */
diff --git a/hw/xfree86/common/xf86Extensions.c b/hw/xfree86/common/xf86Extensions.c
index d5309d558..f9e791607 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 c0c611401..e6bb73673 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 31b0e619a..5b977c7f9 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 },