Commit 2963a2d4 authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

winemac: Don't remove an OpenGL context from its view if we're only going to re-add it.

If the context is being made current with its existing view, just update it before making it current.
parent 2cc53379
......@@ -156,20 +156,25 @@ void macdrv_make_context_current(macdrv_opengl_context c, macdrv_view v)
if (context && view)
{
[context removeFromViews:NO];
macdrv_add_view_opengl_context(v, c);
if (context.needsUpdate)
{
context.needsUpdate = FALSE;
[context setView:view];
[context setLatentView:nil];
}
if (view == [context view] || view == [context latentView])
macdrv_update_opengl_context(c);
else
{
if ([context view])
[context clearDrawableLeavingSurfaceOnScreen];
[context setLatentView:view];
[context removeFromViews:NO];
macdrv_add_view_opengl_context(v, c);
if (context.needsUpdate)
{
context.needsUpdate = FALSE;
[context setView:view];
[context setLatentView:nil];
}
else
{
if ([context view])
[context clearDrawableLeavingSurfaceOnScreen];
[context setLatentView:view];
}
}
[context makeCurrentContext];
......
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