diff options
author | Andreas Färber <andreas.faerber@web.de> | 2009-12-14 22:13:27 +0100 |
---|---|---|
committer | malc <av1474@comtv.ru> | 2010-01-07 10:57:34 +0300 |
commit | 41ea49b328ef0fa292574af719f92de14b28304d (patch) | |
tree | d65d65fce036e49b8a0b0d680d754a20e2521af0 | |
parent | f49188043b9ca4d28aeea82fa462282f58a36414 (diff) |
Cocoa: Shutdown when window is closed
The application is not very useful once the guest window is closed.
QEMU is not a document-based application; terminating it automatically
saves the user another action and resembles SDL behavior.
v2:
- Use delegate method, suggested by Juha Riihimäki.
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Cc: Juha Riihimäki <juha.riihimaki@nokia.com>
Signed-off-by: malc <av1474@comtv.ru>
-rw-r--r-- | cocoa.m | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -783,6 +783,11 @@ static int cocoa_keycode_to_qemu(int keycode) exit(0); } +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication +{ + return YES; +} + - (void)startEmulationWithArgc:(int)argc argv:(char**)argv { COCOA_DEBUG("QemuCocoaAppController: startEmulationWithArgc\n"); |