diff options
author | marha <marha@users.sourceforge.net> | 2011-04-27 15:56:59 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-04-27 15:56:59 +0000 |
commit | 100633b3e7619842f345cb7603b0db6b5761dd11 (patch) | |
tree | 3c3af754c7e801c07263269837d6a05072ff834c /xorg-server/glx/glxcmds.c | |
parent | 205a4bdae76f287126db9f45a4f0ba631e3efca1 (diff) | |
parent | 96d6df5da9cddedf4931bf8e17f96e242467c661 (diff) | |
download | vcxsrv-100633b3e7619842f345cb7603b0db6b5761dd11.tar.gz vcxsrv-100633b3e7619842f345cb7603b0db6b5761dd11.tar.bz2 vcxsrv-100633b3e7619842f345cb7603b0db6b5761dd11.zip |
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/glx/glxcmds.c')
-rw-r--r-- | xorg-server/glx/glxcmds.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/xorg-server/glx/glxcmds.c b/xorg-server/glx/glxcmds.c index 38cb7390a..2c5e13031 100644 --- a/xorg-server/glx/glxcmds.c +++ b/xorg-server/glx/glxcmds.c @@ -1137,10 +1137,11 @@ DoCreateGLXDrawable(ClientPtr client, __GLXscreen *pGlxScreen, return BadAlloc;
}
- /* Add the glx drawable under the XID of the underlying X drawable
- * too. That way we'll get a callback in DrawableGone and can
- * clean up properly when the drawable is destroyed. */
- if (drawableId != glxDrawableId &&
+ /*
+ * Windows aren't refcounted, so track both the X and the GLX window
+ * so we get called regardless of destruction order.
+ */
+ if (drawableId != glxDrawableId && type == GLX_DRAWABLE_WINDOW &&
!AddResource(pDraw->id, __glXDrawableRes, pGlxDraw)) {
pGlxDraw->destroy (pGlxDraw);
return BadAlloc;
@@ -1171,6 +1172,8 @@ DoCreateGLXPixmap(ClientPtr client, __GLXscreen *pGlxScreen, __GLXconfig *config err = DoCreateGLXDrawable(client, pGlxScreen, config, pDraw, drawableId,
glxDrawableId, GLX_DRAWABLE_PIXMAP);
+ ((PixmapPtr)pDraw)->refcnt++;
+
return err;
}
|