mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
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>
This commit is contained in:
parent
f49188043b
commit
41ea49b328
1 changed files with 5 additions and 0 deletions
5
cocoa.m
5
cocoa.m
|
@ -783,6 +783,11 @@ static int cocoa_keycode_to_qemu(int keycode)
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication
|
||||||
|
{
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
- (void)startEmulationWithArgc:(int)argc argv:(char**)argv
|
- (void)startEmulationWithArgc:(int)argc argv:(char**)argv
|
||||||
{
|
{
|
||||||
COCOA_DEBUG("QemuCocoaAppController: startEmulationWithArgc\n");
|
COCOA_DEBUG("QemuCocoaAppController: startEmulationWithArgc\n");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue