sdl: Fix termination in -no-shutdown mode
authorJan Kiszka <jan.kiszka@siemens.com>
Sat, 30 Jul 2011 09:39:04 +0000 (11:39 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 5 Aug 2011 15:57:34 +0000 (10:57 -0500)
Just like the monitor does, we need to clear no_shutdown before calling
qemu_system_shutdown_request on quit requests. Otherwise, QEMU just
stops the VM.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ui/sdl.c

index 6dbc5cb0ed341b8d34fb4423b49f526989b56b85..9efcda5079dbb44bf330c46145ecb17b4d3f8e2f 100644 (file)
--- a/ui/sdl.c
+++ b/ui/sdl.c
@@ -672,8 +672,10 @@ static void sdl_refresh(DisplayState *ds)
                 sdl_process_key(&ev->key);
             break;
         case SDL_QUIT:
-            if (!no_quit)
+            if (!no_quit) {
+                no_shutdown = 0;
                 qemu_system_shutdown_request();
+            }
             break;
         case SDL_MOUSEMOTION:
             if (gui_grab || kbd_mouse_is_absolute() ||