diff options
author | Kevin E Martin <kem@kem.org> | 2004-07-31 04:23:21 +0000 |
---|---|---|
committer | Kevin E Martin <kem@kem.org> | 2004-07-31 04:23:21 +0000 |
commit | 25bd6ff4a622d09fb0c247b7c40281744c61431e (patch) | |
tree | 7ae6338cd31a4e6134195ace92de42e075abdad3 /hw/dmx | |
parent | 326729ebca863c99cf913445126294a3c6d3db5d (diff) |
Add new extension enable/disable feature. This code is a small step in the
right direction -- i.e., moving towards full run-time config of
extensions. Currently, only XTEST, XINERAMA, RENDER, XKB, and XEVIE are
supported.
Diffstat (limited to 'hw/dmx')
-rw-r--r-- | hw/dmx/dmx.h | 3 | ||||
-rw-r--r-- | hw/dmx/dmxinit.c | 8 | ||||
-rw-r--r-- | hw/dmx/dmxwindow.c | 18 |
3 files changed, 11 insertions, 18 deletions
diff --git a/hw/dmx/dmx.h b/hw/dmx/dmx.h index 759e5e11f..18e75de90 100644 --- a/hw/dmx/dmx.h +++ b/hw/dmx/dmx.h @@ -283,9 +283,6 @@ extern Bool dmxUseXKB; /**< True if the XKB * servers */ extern int dmxDepth; /**< Requested depth if * non-zero */ -extern Bool dmxNoRender; /**< True if the RENDER - * extension should be - * disabled */ #ifdef GLXEXT extern Bool dmxGLXProxy; /**< True if glxProxy * support is enabled */ diff --git a/hw/dmx/dmxinit.c b/hw/dmx/dmxinit.c index 71dfb5197..00ce18425 100644 --- a/hw/dmx/dmxinit.c +++ b/hw/dmx/dmxinit.c @@ -101,8 +101,6 @@ Bool dmxUseXKB = TRUE; int dmxDepth = 0; -Bool dmxNoRender = FALSE; - #ifndef GLXEXT static Bool dmxGLXProxy = FALSE; #else @@ -625,7 +623,7 @@ void InitOutput(ScreenInfo *pScreenInfo, int argc, char *argv[]) } /* Make sure that the command-line arguments are sane. */ - if (dmxAddRemoveScreens && (!dmxNoRender || dmxGLXProxy)) { + if (dmxAddRemoveScreens && (!noRenderExtension || dmxGLXProxy)) { /* Currently it is not possible to support GLX and Render * extensions with dynamic screen addition/removal due to the * state that each extension keeps, which cannot be restored. */ @@ -804,7 +802,7 @@ void InitOutput(ScreenInfo *pScreenInfo, int argc, char *argv[]) #ifdef RENDER /* Initialize the render extension */ - if (!dmxNoRender) + if (!noRenderExtension) dmxInitRender(); #endif @@ -939,7 +937,7 @@ int ddxProcessArgument(int argc, char *argv[], int i) if (++i < argc) dmxDepth = atoi(argv[i]); retval = 2; } else if (!strcmp(argv[i], "-norender")) { - dmxNoRender = TRUE; + noRenderExtension = TRUE; retval = 1; #ifdef GLXEXT } else if (!strcmp(argv[i], "-noglxproxy")) { diff --git a/hw/dmx/dmxwindow.c b/hw/dmx/dmxwindow.c index e83b0d3bb..2db72d795 100644 --- a/hw/dmx/dmxwindow.c +++ b/hw/dmx/dmxwindow.c @@ -379,13 +379,6 @@ Bool dmxCreateWindow(WindowPtr pWindow) return ret; } -#ifndef RENDER -static Bool dmxDestroyPictureList(WindowPtr pWindow) -{ - return TRUE; -} -#endif - /** Destroy \a pWindow on the back-end server. */ Bool dmxBEDestroyWindow(WindowPtr pWindow) { @@ -409,16 +402,21 @@ Bool dmxDestroyWindow(WindowPtr pWindow) ScreenPtr pScreen = pWindow->drawable.pScreen; DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum]; Bool ret = TRUE; + Bool needSync = FALSE; #ifdef GLXEXT dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow); #endif DMX_UNWRAP(DestroyWindow, dmxScreen, pScreen); +#ifdef RENDER + /* Destroy any picture list associated with this window */ + needSync |= dmxDestroyPictureList(pWindow); +#endif + /* Destroy window on back-end server */ - if (dmxDestroyPictureList(pWindow) || dmxBEDestroyWindow(pWindow)) { - dmxSync(dmxScreen, FALSE); - } + needSync |= dmxBEDestroyWindow(pWindow); + if (needSync) dmxSync(dmxScreen, FALSE); #ifdef GLXEXT if (pWinPriv->swapGroup && pWinPriv->windowDestroyed) |