Commit a27100b8 authored by Michael Müller's avatar Michael Müller Committed by Vitaly Lipatov

winex11.drv: Only warn about used contexts in wglShareLists.

parent e94b8ec7
...@@ -564,7 +564,7 @@ static void test_sharelists(HDC winhdc) ...@@ -564,7 +564,7 @@ static void test_sharelists(HDC winhdc)
res = wglMakeCurrent(winhdc, hglrc2); res = wglMakeCurrent(winhdc, hglrc2);
ok(res, "Make current failed\n"); ok(res, "Make current failed\n");
res = wglShareLists(hglrc1, hglrc2); res = wglShareLists(hglrc1, hglrc2);
todo_wine ok(res, "Sharing display lists with a destination context which has been made current failed\n"); ok(res, "Sharing display lists with a destination context which has been made current failed\n");
wglMakeCurrent(0, 0); wglMakeCurrent(0, 0);
wglDeleteContext(hglrc2); wglDeleteContext(hglrc2);
} }
......
...@@ -1930,18 +1930,16 @@ static BOOL WINAPI glxdrv_wglShareLists(struct wgl_context *org, struct wgl_cont ...@@ -1930,18 +1930,16 @@ static BOOL WINAPI glxdrv_wglShareLists(struct wgl_context *org, struct wgl_cont
* current or when it hasn't shared display lists before. * current or when it hasn't shared display lists before.
*/ */
if((org->has_been_current && dest->has_been_current) || dest->has_been_current) if(dest->sharing)
{
ERR("Could not share display lists, one of the contexts has been current already !\n");
return FALSE;
}
else if(dest->sharing)
{ {
ERR("Could not share display lists because hglrc2 has already shared lists before\n"); ERR("Could not share display lists because hglrc2 has already shared lists before\n");
return FALSE; return FALSE;
} }
else else
{ {
if(dest->has_been_current)
ERR("Recreating OpenGL context to share display lists, although the context has been current!\n");
/* Re-create the GLX context and share display lists */ /* Re-create the GLX context and share display lists */
pglXDestroyContext(gdi_display, dest->ctx); pglXDestroyContext(gdi_display, dest->ctx);
dest->ctx = create_glxcontext(gdi_display, dest, org->ctx); dest->ctx = create_glxcontext(gdi_display, dest, org->ctx);
......
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