On Tue, 2011-03-29 at 10:09 +0200, Michel Dänzer wrote:
> On Mon, 2011-03-28 at 12:40 -0400, Adam Jackson wrote: 
> > diff --git a/glx/glxcmds.c b/glx/glxcmds.c
> > index 9b4bc9e..9d60bdb 100644
> > --- a/glx/glxcmds.c
> > +++ b/glx/glxcmds.c
> > @@ -1177,10 +1177,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)) {
> 
> Is pDraw->id == drawableId always true here for windows? That was one of
> the issues previously proposed fixes in this area were trying to
> address.

Yes.  This is only called for windows from the CreateWindow path:

    err = dixLookupDrawable(&pDraw, req->window, client, 0,
DixAddAccess);
    /* ... */
    return DoCreateGLXDrawable(client, pGlxScreen, config,
                               pDraw, req->window,
                               req->glxwindow, GLX_DRAWABLE_WINDOW);

However it would probably be clearer to change it to be drawableId for
symmetry with the AddResource call immediately above.

- ajax

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to