Currently, SDL doesn't exit on window close because it stuck in
sdl__stop because "done" is not set to true.

Fix it by setting "done" to true on window close.

Signed-off-by: Lin Ming <min...@gmail.com>
---
 tools/kvm/ui/sdl.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tools/kvm/ui/sdl.c b/tools/kvm/ui/sdl.c
index 9994490..a260002 100644
--- a/tools/kvm/ui/sdl.c
+++ b/tools/kvm/ui/sdl.c
@@ -265,6 +265,7 @@ static void *sdl__thread(void *p)
                return NULL;
        }
 exit:
+       done = true;
        kvm_cpu__reboot(fb->kvm);
 
        return NULL;
-- 
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to