summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2011-07-30 11:39:04 +0200
committerJustin M. Forbes <jforbes@redhat.com>2011-10-03 14:42:24 -0500
commit68e3508eafd111c050e0a6f4dc8588dbe75d0e1c (patch)
treea8e958b0c85a874b2d76d56649b000ca0e955c76
parentfb524042dbc1142406c4d2e5858743c3dc8588c3 (diff)
downloadqemu-68e3508eafd111c050e0a6f4dc8588dbe75d0e1c.tar.gz
sdl: Fix termination in -no-shutdown mode
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>
-rw-r--r--ui/sdl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/sdl.c b/ui/sdl.c
index 6dbc5cb0ed..9efcda5079 100644
--- 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() ||