Set the GLX screen on context creation

This commit is contained in:
Alan Hourihane 2008-08-20 10:45:20 +01:00
parent 215a801a25
commit bede10747a

View file

@ -117,6 +117,8 @@ glitz_glucose_create_drawable_for_window (__GLXscreen *screen,
if (!context)
return NULL;
context->context->pGlxScreen = screen;
drawable = _glitz_glucose_create_drawable (screen_info, context, format,
window,
width, height);
@ -146,8 +148,8 @@ glitz_glucose_destroy (void *abstract_drawable)
glitz_glucose_pop_current (abstract_drawable);
}
if (__glXLastContext->drawPriv == drawable->drawable) {
__glXDeassociateContext(drawable->context->context);
if (__glXLastContext &&
__glXLastContext->drawPriv == drawable->drawable) {
__glXLastContext = NULL;
}