qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Jindrich Makovicka <makovick@gmail.com>,
	Gerd Hoffmann <kraxel@redhat.com>
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	[thread overview]
Message-ID: <20171117100653.13015-6-kraxel@redhat.com> (raw)
In-Reply-To: <20171117100653.13015-1-kraxel@redhat.com>

From: Jindrich Makovicka <makovick@gmail.com>

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>
---
 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

  parent reply	other threads:[~2017-11-17 10:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-17 10:06 [Qemu-devel] [PULL 0/5] Ui 20171117 patches Gerd Hoffmann
2017-11-17 10:06 ` [Qemu-devel] [PULL 1/5] sdl2: Do not quit the emulator when an auxilliary window is closed Gerd Hoffmann
2017-11-17 10:06 ` [Qemu-devel] [PULL 2/5] sdl2: Use the same pointer show/hide logic for absolute and relative mode Gerd Hoffmann
2017-11-17 10:06 ` [Qemu-devel] [PULL 3/5] sdl2: Fix dead keyboard after fullsceen Gerd Hoffmann
2017-11-17 10:06 ` [Qemu-devel] [PULL 4/5] sdl2: Do not leave grab when fullscreen Gerd Hoffmann
2017-11-17 10:06 ` Gerd Hoffmann [this message]
2017-11-17 12:20 ` [Qemu-devel] [PULL 0/5] Ui 20171117 patches Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171117100653.13015-6-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=makovick@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).