[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 1/5] sdl2: Do not quit the emulator when an auxilliar
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 1/5] sdl2: Do not quit the emulator when an auxilliary window is closed |
Date: |
Fri, 17 Nov 2017 11:06:49 +0100 |
From: Jindrich Makovicka <address@hidden>
Signed-off-by: Jindrich Makovicka <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
---
ui/sdl2.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/ui/sdl2.c b/ui/sdl2.c
index 53dd447fd2..05729af971 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -566,9 +566,14 @@ static void handle_windowevent(SDL_Event *ev)
update_displaychangelistener(&scon->dcl, 500);
break;
case SDL_WINDOWEVENT_CLOSE:
- if (!no_quit) {
- no_shutdown = 0;
- qemu_system_shutdown_request(SHUTDOWN_CAUSE_HOST_UI);
+ if (qemu_console_is_graphic(scon->dcl.con)) {
+ if (!no_quit) {
+ no_shutdown = 0;
+ qemu_system_shutdown_request(SHUTDOWN_CAUSE_HOST_UI);
+ }
+ } else {
+ SDL_HideWindow(scon->real_window);
+ scon->hidden = true;
}
break;
case SDL_WINDOWEVENT_SHOWN:
--
2.9.3
- [Qemu-devel] [PULL 0/5] Ui 20171117 patches, Gerd Hoffmann, 2017/11/17
- [Qemu-devel] [PULL 2/5] sdl2: Use the same pointer show/hide logic for absolute and relative mode, Gerd Hoffmann, 2017/11/17
- [Qemu-devel] [PULL 5/5] sdl2: Fix broken display updating after the window is hidden, Gerd Hoffmann, 2017/11/17
- [Qemu-devel] [PULL 3/5] sdl2: Fix dead keyboard after fullsceen, Gerd Hoffmann, 2017/11/17
- [Qemu-devel] [PULL 4/5] sdl2: Do not leave grab when fullscreen, Gerd Hoffmann, 2017/11/17
- [Qemu-devel] [PULL 1/5] sdl2: Do not quit the emulator when an auxilliary window is closed,
Gerd Hoffmann <=
- Re: [Qemu-devel] [PULL 0/5] Ui 20171117 patches, Peter Maydell, 2017/11/17