On Thu, Apr 8, 2010 at 9:02 PM, Keith Packard <[email protected]> wrote: > On Thu, 8 Apr 2010 20:06:40 -0400, Kristian Høgsberg <[email protected]> > wrote: > >> +static int glxWindowPrivateKeyIndex; >> +static DevPrivateKey glxWindowPrivateKey = &glxWindowPrivateKeyIndex; > > Because there doesn't appear to be any performance critical use for this > object, it should be in the resource database keyed off the window id > using a new resource type. That will automatically get destroyed when > the window is destroyed, which seems like exactly the semantic you desire.
It already is in the resource database and in some cases it has the same XID as the window - it's the GLX drawable. The problem is that we need to enforce a certain shutdown order: we have to destroy the GLX drawable while the X drawable is still a valid pointer. Alternatively we could NULL out the Drawable pointer in the GLX drawable in the GLX DestroyWindow hook, but for that we still need to the window private to be able to look up the GLX drawable for the window. Do you have a better suggestion? Kristian _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
