aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorJindrich Makovicka <makovick@gmail.com>2017-11-12 20:30:25 +0100
committerGerd Hoffmann <kraxel@redhat.com>2017-11-16 09:57:47 +0100
commitbcf43cdc178ffbd06d0533b6c54e92640817c9c7 (patch)
tree9c0c6dc5994e10080a25db286867ad62a50982ad /ui
parent24952847ad50f1b120287fdc4469b78108eef33c (diff)
downloadqemu-bcf43cdc178ffbd06d0533b6c54e92640817c9c7.zip
qemu-bcf43cdc178ffbd06d0533b6c54e92640817c9c7.tar.gz
qemu-bcf43cdc178ffbd06d0533b6c54e92640817c9c7.tar.bz2
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: Jindrich Makovicka <makovick@gmail.com> Message-Id: <20171112193032.9724-2-makovick@gmail.com> This is a partial revert of d3f3a0f453ea590be529079ae214c200bb5ecc1a, 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=3410 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/sdl2.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/ui/sdl2.c b/ui/sdl2.c
index 8360054..8718cf3 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -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;
}
}