diff options
Diffstat (limited to 'src/glx/glxcmds.c')
-rw-r--r-- | src/glx/glxcmds.c | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c index 95751560801..4f7e84ef5f9 100644 --- a/src/glx/glxcmds.c +++ b/src/glx/glxcmds.c @@ -63,56 +63,6 @@ static const char __glXGLXClientVersion[] = "1.4"; #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) -static Bool windowExistsFlag; -static int -windowExistsErrorHandler(Display * dpy, XErrorEvent * xerr) -{ - (void) dpy; - - if (xerr->error_code == BadWindow) { - windowExistsFlag = GL_FALSE; - } - return 0; -} - -/** - * Find drawables in the local hash that have been destroyed on the - * server. - * - * \param dpy Display to destroy drawables for - * \param screen Screen number to destroy drawables for - */ -_X_HIDDEN void -GarbageCollectDRIDrawables(struct glx_screen * sc) -{ - XID draw; - __GLXDRIdrawable *pdraw; - struct glx_display *priv = sc->display; - XWindowAttributes xwa; - int (*oldXErrorHandler) (Display *, XErrorEvent *); - - /* Set no-op error handler so Xlib doesn't bail out if the windows - * has alreay been destroyed on the server. */ - XSync(priv->dpy, GL_FALSE); - oldXErrorHandler = XSetErrorHandler(windowExistsErrorHandler); - - if (__glxHashFirst(priv->drawHash, &draw, (void *) &pdraw) == 1) { - do { - windowExistsFlag = GL_TRUE; - XGetWindowAttributes(priv->dpy, draw, &xwa); /* dummy request */ - if (!windowExistsFlag) { - /* Destroy the local drawable data, if the drawable no - longer exists in the Xserver */ - (*pdraw->destroyDrawable) (pdraw); - __glxHashDelete(priv->drawHash, draw); - } - } while (__glxHashNext(priv->drawHash, &draw, (void *) &pdraw) == 1); - } - - XSync(priv->dpy, GL_FALSE); - XSetErrorHandler(oldXErrorHandler); -} - /** * Get the __DRIdrawable for the drawable associated with a GLXContext * |