- Disable building DMX on OSs that have not been verified to build

correctly (Kevin Martin).
- Fix DMX build when Xinerama is not enabled (Kevin Martin).
This commit is contained in:
Kevin E Martin 2004-07-06 23:51:00 +00:00
parent 0e45f2a753
commit 1498d7a096
5 changed files with 56 additions and 29 deletions

View File

@ -432,10 +432,12 @@ static int ProcDMXChangeScreensAttributes(ClientPtr client)
value_list += count;
}
#if PANORAMIX
status = dmxConfigureScreenWindows(stuff->screenCount,
screen_list,
attribs,
&errorScreen);
#endif
DEALLOCATE_LOCAL(attribs);
@ -733,7 +735,9 @@ static int ProcDMXChangeDesktopAttributes(ClientPtr client)
dmxGetDesktopAttributes(&attr);
dmxFetchDesktopAttributes(stuff->valueMask, &attr, value_list);
#if PANORAMIX
status = dmxConfigureDesktop(&attr);
#endif
if (status == BadValue) return status;
noxinerama:

View File

@ -42,9 +42,12 @@
extern char *ConnectionInfo;
extern int connBlockScreenStart;
#ifdef PANORAMIX
extern int PanoramiXPixWidth;
extern int PanoramiXPixHeight;
extern int PanoramiXNumScreens;
#endif
int dmxGlobalWidth, dmxGlobalHeight;
@ -115,6 +118,7 @@ void dmxConnectionBlockCallback(void)
dmxLog(dmxFatal, "dmxConnectionBlockCallback: out of memory\n");
dmxLog(dmxInfo, "===== Start of Summary =====\n");
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
if (dmxGlobalWidth && dmxGlobalHeight
&& (dmxGlobalWidth != PanoramiXPixWidth
@ -133,6 +137,7 @@ void dmxConnectionBlockCallback(void)
PanoramiXNumScreens, PanoramiXPixWidth, PanoramiXPixHeight);
for (i = 0; i < PanoramiXNumScreens; i++) found[i] = FALSE;
} else {
#endif
/* This never happens because we're
* either called from a Xinerama
* callback or during reconfiguration
@ -140,7 +145,9 @@ void dmxConnectionBlockCallback(void)
* In any case, be reasonable. */
dmxLog(dmxInfo, "%d screens configured (%d %d)\n",
screenInfo.numScreens, root->pixWidth, root->pixHeight);
#ifdef PANORAMIX
}
#endif
for (i = 0; i < root->nDepths; i++) {
xDepth *depth = (xDepth *)(ConnectionInfo + offset);
@ -165,6 +172,7 @@ void dmxConnectionBlockCallback(void)
vi.bits_per_rgb = visual->bitsPerRGB;
dmxLogVisual(NULL, &vi, 0);
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
int k;
for (k = 0; k < PanoramiXNumScreens; k++) {
@ -182,6 +190,7 @@ void dmxConnectionBlockCallback(void)
}
}
}
#endif
}
offset = voffset + depth->nVisuals * sizeof(xVisualType);
}
@ -189,6 +198,7 @@ void dmxConnectionBlockCallback(void)
dmxInputLogDevices();
dmxLog(dmxInfo, "===== End of Summary =====\n");
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
Bool fatal = FALSE;
for (i = 0; i < PanoramiXNumScreens; i++) {
@ -205,5 +215,6 @@ void dmxConnectionBlockCallback(void)
dmxLog(dmxFatal,
"dmxConnectionBlockCallback: invalid screen(s) found");
}
#endif
MAXSCREENSFREE(found);
}

View File

@ -289,35 +289,6 @@ void dmxFlushPendingSyncs(void)
dmxSync(NULL, TRUE);
}
#ifdef PANORAMIX
#include "panoramiXsrv.h"
/* Defined in dix/events.c */
extern void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff);
/** Change the "screen" window attributes by resizing the actual window
* on the back-end display (if necessary). */
static void dmxConfigureScreenWindow(int idx,
int x, int y, int w, int h)
{
DMXScreenInfo *dmxScreen = &dmxScreens[idx];
ScreenPtr pScreen = screenInfo.screens[idx];
/* Resize "screen" window */
if (dmxScreen->scrnX != x ||
dmxScreen->scrnY != y ||
dmxScreen->scrnWidth != w ||
dmxScreen->scrnHeight != h) {
dmxResizeScreenWindow(pScreen, x, y, w, h);
}
/* Change "screen" window values */
dmxScreen->scrnX = x;
dmxScreen->scrnY = y;
dmxScreen->scrnWidth = w;
dmxScreen->scrnHeight = h;
}
/** Update DMX's screen resources to match those of the newly moved
* and/or resized "root" window. */
void dmxUpdateScreenResources(ScreenPtr pScreen, int x, int y, int w, int h)
@ -396,6 +367,35 @@ void dmxUpdateScreenResources(ScreenPtr pScreen, int x, int y, int w, int h)
}
}
#ifdef PANORAMIX
#include "panoramiXsrv.h"
/* Defined in dix/events.c */
extern void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff);
/** Change the "screen" window attributes by resizing the actual window
* on the back-end display (if necessary). */
static void dmxConfigureScreenWindow(int idx,
int x, int y, int w, int h)
{
DMXScreenInfo *dmxScreen = &dmxScreens[idx];
ScreenPtr pScreen = screenInfo.screens[idx];
/* Resize "screen" window */
if (dmxScreen->scrnX != x ||
dmxScreen->scrnY != y ||
dmxScreen->scrnWidth != w ||
dmxScreen->scrnHeight != h) {
dmxResizeScreenWindow(pScreen, x, y, w, h);
}
/* Change "screen" window values */
dmxScreen->scrnX = x;
dmxScreen->scrnY = y;
dmxScreen->scrnWidth = w;
dmxScreen->scrnHeight = h;
}
/** Change the "root" window position and size by resizing the actual
* window on the back-end display (if necessary) and updating all of
* DMX's resources by calling #dmxUpdateScreenResources. */

View File

@ -668,11 +668,13 @@ void InitOutput(ScreenInfo *pScreenInfo, int argc, char *argv[])
for (i = 0; i < dmxNumScreens; i++)
dmxDisplayInit(&dmxScreens[i]);
#if PANORAMIX
/* Register a Xinerama callback which will run from within
* PanoramiXCreateConnectionBlock. We can use the callback to
* determine if Xinerama is loaded and to check the visuals
* determined by PanoramiXConsolidate. */
XineramaRegisterConnectionBlockCallback(dmxConnectionBlockCallback);
#endif
/* Since we only have a single screen thus far, we only need to set
the pixmap formats to match that screen. FIXME: this isn't true.*/

View File

@ -1133,11 +1133,13 @@ static int MakeCurrent(__GLXclientState *cl,
else if (pGlxPbuffer) {
be_draw = pGlxPbuffer->be_xids[s];
}
#ifdef PANORAMIX
else if (pXinDraw) {
pWin = (WindowPtr)SecurityLookupWindow(pXinDraw->info[s].id,
client,
SecurityReadAccess);
}
#endif
else if (pGlxWindow) {
pWin = (WindowPtr)pGlxWindow->pDraw;
}
@ -1189,11 +1191,13 @@ static int MakeCurrent(__GLXclientState *cl,
else if (pGlxReadPbuffer) {
be_read_draw = pGlxReadPbuffer->be_xids[s];
}
#ifdef PANORAMIX
else if (pXinReadDraw) {
pReadWin = (WindowPtr)SecurityLookupWindow(pXinReadDraw->info[s].id,
client,
SecurityReadAccess);
}
#endif
else if (pGlxReadWindow) {
pReadWin = (WindowPtr)pGlxReadWindow->pDraw;
}
@ -1773,9 +1777,11 @@ static int CreateGLXPixmap(__GLXclientState *cl,
Pixmap be_pixmap;
DrawablePtr pRealDraw = pDraw;
#ifdef PANORAMIX
if (pXinDraw) {
pRealDraw = (DrawablePtr) LookupDrawable(pXinDraw->info[s].id,client);
}
#endif
be_pixmap = (DMX_GET_PIXMAP_PRIV((PixmapPtr)pRealDraw))->pixmap;
@ -1933,7 +1939,9 @@ int __glXDoSwapBuffers(__GLXclientState *cl, XID drawId, GLXContextTag tag)
WindowPtr pWin = NULL;
__GLXpixmap *pGlxPixmap = NULL;
__GLXcontext *glxc = NULL;
#ifdef PANORAMIX
PanoramiXRes *pXinDraw = NULL;
#endif
__glXWindow *pGlxWindow = NULL;
int from_screen = 0;
int to_screen = 0;
@ -2046,11 +2054,13 @@ int __glXDoSwapBuffers(__GLXclientState *cl, XID drawId, GLXContextTag tag)
if (pGlxPixmap) {
be_draw = (unsigned int)pGlxPixmap->be_xids[s];
}
#ifdef PANORAMIX
else if (pXinDraw) {
pWin = (WindowPtr)SecurityLookupWindow(pXinDraw->info[s].id,
client,
SecurityReadAccess);
}
#endif
else if (pGlxWindow) {
pWin = (WindowPtr)pGlxWindow->pDraw;
}