Commit 437b2749 authored by Jon Turney's avatar Jon Turney

Revert "glx: Simplify glXDestroyContext"

This reverts commit 7f5adf73.

This seems to miss the whole point of the idExists flag, as it makes the
lifetime of that being true the same as the lifetime of the Context resource.

The previously current context tag is always given in a MakeContextCurrent
request, even if that context tag is no longer valid (for example, the context
has been deleted), so this leads to BadContextTag errors.

See fd.o bug #30089 for the makecurrenttest.c testcase, and some discussion of
previous manifestations of this bug.
Signed-off-by: Jon Turney's avatarJon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
parent 4b0d0df3
......@@ -413,7 +413,9 @@ __glXDisp_DestroyContext(__GLXclientState * cl, GLbyte * pc)
&glxc, &err))
return err;
FreeResourceByType(req->context, __glXContextRes, FALSE);
glxc->idExists = GL_FALSE;
if (!glxc->currentClient)
FreeResourceByType(req->context, __glXContextRes, FALSE);
return Success;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment