sdl2: Do not quit the emulator when an auxilliary window is closed

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Message-Id: <20171112193032.9724-3-makovick@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
master
Jindrich Makovicka 2017-11-12 20:30:26 +01:00 committed by Gerd Hoffmann
parent 1fa0f627d0
commit fc49e7279d
1 changed files with 8 additions and 3 deletions

View File

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