diff options
Diffstat (limited to 'src/glx/glxcmds.c')
-rw-r--r-- | src/glx/glxcmds.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c index 21068184ce2..191b321ce32 100644 --- a/src/glx/glxcmds.c +++ b/src/glx/glxcmds.c @@ -640,19 +640,33 @@ glXCreateGLXPixmap(Display * dpy, XVisualInfo * vis, Pixmap pixmap) psc = priv->screens[vis->screen]; if (psc->driScreen == NULL) - break; + return xid; + config = glx_config_find_visual(psc->visuals, vis->visualid); pdraw = psc->driScreen->createDrawable(psc, pixmap, xid, config); if (pdraw == NULL) { fprintf(stderr, "failed to create pixmap\n"); + xid = None; break; } if (__glxHashInsert(priv->drawHash, xid, pdraw)) { (*pdraw->destroyDrawable) (pdraw); - return None; /* FIXME: Check what we're supposed to do here... */ + xid = None; + break; } } while (0); + + if (xid == None) { + xGLXDestroyGLXPixmapReq *dreq; + LockDisplay(dpy); + GetReq(GLXDestroyGLXPixmap, dreq); + dreq->reqType = opcode; + dreq->glxCode = X_GLXDestroyGLXPixmap; + dreq->glxpixmap = xid; + UnlockDisplay(dpy); + SyncHandle(); + } #endif return xid; |