提交 bcf43cdc 编写于 作者: J Jindrich Makovicka 提交者: Gerd Hoffmann

sdl2: Fix broken display updating after the window is hidden

With SDL 2.0.6, calling SDL_ShowWindow during SDL_WINDOWEVENT_HIDDEN
blocks all subsequent display updates.

Instead of trying to override the change, just update the scon->hidden
flag.
Signed-off-by: NJindrich Makovicka <makovick@gmail.com>
Message-Id: <20171112193032.9724-2-makovick@gmail.com>

This is a partial revert of d3f3a0f4,
which in turn is a workaround for a SDL bug.  The bug is fixed in 2.0.6,
see https://bugzilla.libsdl.org/show_bug.cgi?id=3410Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 24952847
......@@ -581,14 +581,10 @@ static void handle_windowevent(SDL_Event *ev)
}
break;
case SDL_WINDOWEVENT_SHOWN:
if (scon->hidden) {
SDL_HideWindow(scon->real_window);
}
scon->hidden = false;
break;
case SDL_WINDOWEVENT_HIDDEN:
if (!scon->hidden) {
SDL_ShowWindow(scon->real_window);
}
scon->hidden = true;
break;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册