qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 5/5] sdl2: Fix broken display updating after the wind


From: Gerd Hoffmann
Subject: [Qemu-devel] [PULL 5/5] sdl2: Fix broken display updating after the window is hidden
Date: Fri, 17 Nov 2017 11:06:53 +0100

From: Jindrich Makovicka <address@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 <address@hidden>
Message-Id: <address@hidden>

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 <address@hidden>
---
 ui/sdl2.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/ui/sdl2.c b/ui/sdl2.c
index 8360054094..8718cf36b5 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;
     }
 }
-- 
2.9.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]