diff mbox series

[1/7] sdl2: Fix broken display updating after the window is hidden

Message ID 20171023210803.20998-2-makovick@gmail.com
State New
Headers show
Series [1/7] sdl2: Fix broken display updating after the window is hidden | expand

Commit Message

Jindřich Makovička Oct. 23, 2017, 9:07 p.m. UTC
With SDL 2.0.6, calling SDL_ShowWindow during SDL_WINDOWEVENT_HIDDEN
blocks all subsequent display updates.
---
 ui/sdl2.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Gerd Hoffmann Nov. 1, 2017, 10:37 a.m. UTC | #1
On Mon, 2017-10-23 at 23:07 +0200, Jindrich Makovicka wrote:
> With SDL 2.0.6, calling SDL_ShowWindow during SDL_WINDOWEVENT_HIDDEN
> blocks all subsequent display updates.

Hmm, yes, seems we confuse SDL that way.  Also not letting the user
hide the window isn't very nice (same for the _SHOWN event).  But I
think we should update scon->hidden status on these events, so qemu
keeps track of the state properly and mixing ctrl-alt-<nr> hotkeys and
window buttons for hide/show works correctly.

cheers,
  Gerd
diff mbox series

Patch

diff --git a/ui/sdl2.c b/ui/sdl2.c
index 53dd447fd2..7f51933234 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -576,11 +576,6 @@  static void handle_windowevent(SDL_Event *ev)
             SDL_HideWindow(scon->real_window);
         }
         break;
-    case SDL_WINDOWEVENT_HIDDEN:
-        if (!scon->hidden) {
-            SDL_ShowWindow(scon->real_window);
-        }
-        break;
     }
 }