qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2 RESEND 09/11] Cocoa: Shutdown when window is clos


From: Andreas Färber
Subject: [Qemu-devel] [PATCH v2 RESEND 09/11] Cocoa: Shutdown when window is closed
Date: Wed, 6 Jan 2010 23:47:15 +0100

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 <address@hidden>
Cc: Juha Riihimäki <address@hidden>
---
 cocoa.m |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/cocoa.m b/cocoa.m
index 70c249b..57dcff8 100644
--- a/cocoa.m
+++ b/cocoa.m
@@ -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");
-- 
1.6.5.3





reply via email to

[Prev in Thread] Current Thread [Next in Thread]