aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx/glxcmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/glx/glxcmds.c')
-rw-r--r--xorg-server/glx/glxcmds.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/xorg-server/glx/glxcmds.c b/xorg-server/glx/glxcmds.c
index e9350e380..c0e8feec2 100644
--- a/xorg-server/glx/glxcmds.c
+++ b/xorg-server/glx/glxcmds.c
@@ -516,8 +516,9 @@ __glXGetDrawable(__GLXcontext *glxc, GLXDrawable drawId, ClientPtr client,
if (!validGlxFBConfigForWindow(client, glxc->config, pDraw, error))
return NULL;
- pGlxDraw = glxc->pGlxScreen->createDrawable(glxc->pGlxScreen,
- pDraw, GLX_DRAWABLE_WINDOW,
+ pGlxDraw = glxc->pGlxScreen->createDrawable(client, glxc->pGlxScreen,
+ pDraw, drawId,
+ GLX_DRAWABLE_WINDOW,
drawId, glxc->config);
/* since we are creating the drawablePrivate, drawId should be new */
@@ -1108,15 +1109,17 @@ __glXDrawableRelease(__GLXdrawable *drawable)
}
static int
-DoCreateGLXDrawable(ClientPtr client, __GLXscreen *pGlxScreen, __GLXconfig *config,
- DrawablePtr pDraw, XID glxDrawableId, int type)
+DoCreateGLXDrawable(ClientPtr client, __GLXscreen *pGlxScreen,
+ __GLXconfig *config, DrawablePtr pDraw, XID drawableId,
+ XID glxDrawableId, int type)
{
__GLXdrawable *pGlxDraw;
if (pGlxScreen->pScreen != pDraw->pScreen)
return BadMatch;
- pGlxDraw = pGlxScreen->createDrawable(pGlxScreen, pDraw, type,
+ pGlxDraw = pGlxScreen->createDrawable(client, pGlxScreen, pDraw,
+ drawableId, type,
glxDrawableId, config);
if (pGlxDraw == NULL)
return BadAlloc;
@@ -1129,7 +1132,7 @@ DoCreateGLXDrawable(ClientPtr client, __GLXscreen *pGlxScreen, __GLXconfig *conf
/* 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 (pDraw->id != glxDrawableId &&
+ if (drawableId != glxDrawableId &&
!AddResource(pDraw->id, __glXDrawableRes, pGlxDraw)) {
pGlxDraw->destroy (pGlxDraw);
return BadAlloc;
@@ -1157,7 +1160,7 @@ DoCreateGLXPixmap(ClientPtr client, __GLXscreen *pGlxScreen, __GLXconfig *config
return BadPixmap;
}
- err = DoCreateGLXDrawable(client, pGlxScreen, config, pDraw,
+ err = DoCreateGLXDrawable(client, pGlxScreen, config, pDraw, drawableId,
glxDrawableId, GLX_DRAWABLE_PIXMAP);
return err;
@@ -1320,7 +1323,8 @@ DoCreatePbuffer(ClientPtr client, int screenNum, XID fbconfigId,
return BadAlloc;
return DoCreateGLXDrawable(client, pGlxScreen, config, &pPixmap->drawable,
- glxDrawableId, GLX_DRAWABLE_PBUFFER);
+ glxDrawableId, glxDrawableId,
+ GLX_DRAWABLE_PBUFFER);
}
int __glXDisp_CreatePbuffer(__GLXclientState *cl, GLbyte *pc)
@@ -1443,7 +1447,8 @@ int __glXDisp_CreateWindow(__GLXclientState *cl, GLbyte *pc)
return err;
return DoCreateGLXDrawable(client, pGlxScreen, config,
- pDraw, req->glxwindow, GLX_DRAWABLE_WINDOW);
+ pDraw, req->window,
+ req->glxwindow, GLX_DRAWABLE_WINDOW);
}
int __glXDisp_DestroyWindow(__GLXclientState *cl, GLbyte *pc)