cocoa: kill qemu when its window is closed
authorJuha Riihimäki <juhriihi@esdhcp043194.research.nokia.com>
Tue, 12 May 2009 10:06:01 +0000 (13:06 +0300)
committerJuha Riihimäki <juhriihi@esdhcp043194.research.nokia.com>
Tue, 12 May 2009 10:06:01 +0000 (13:06 +0300)
cocoa.m

diff --git a/cocoa.m b/cocoa.m
index 0662df3..06958a5 100644 (file)
--- a/cocoa.m
+++ b/cocoa.m
@@ -705,6 +705,7 @@ static int cocoa_keycode_to_qemu(int keycode)
 - (void)toggleFullScreen:(id)sender;
 - (void)showQEMUDoc:(id)sender;
 - (void)showQEMUTec:(id)sender;
+- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication;
 @end
 
 @implementation QemuCocoaAppController
@@ -828,6 +829,11 @@ static int cocoa_keycode_to_qemu(int keycode)
     [[NSWorkspace sharedWorkspace] openFile:[NSString stringWithFormat:@"%@/../doc/qemu/qemu-tech.html",
         [[NSBundle mainBundle] resourcePath]] withApplication:@"Help Viewer"];
 }
+
+- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication
+{
+    return YES;
+}
 @end