From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NKIQP-0007bc-9t for qemu-devel@nongnu.org; Mon, 14 Dec 2009 16:25:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NKIQK-0007Xk-IP for qemu-devel@nongnu.org; Mon, 14 Dec 2009 16:25:48 -0500 Received: from [199.232.76.173] (port=49602 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NKIQK-0007Xf-E4 for qemu-devel@nongnu.org; Mon, 14 Dec 2009 16:25:44 -0500 Received: from fmmailgate03.web.de ([217.72.192.234]:59740) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NKIQK-0005OH-1Q for qemu-devel@nongnu.org; Mon, 14 Dec 2009 16:25:44 -0500 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Mon, 14 Dec 2009 22:25:34 +0100 Message-Id: <1260825934-4647-1-git-send-email-andreas.faerber@web.de> In-Reply-To: <9880D1BC-C3D9-4F72-B34F-2C3321A74F62@nokia.com> References: <9880D1BC-C3D9-4F72-B34F-2C3321A74F62@nokia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: andreas.faerber@web.de Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v2 09/11] Cocoa: Shutdown when window is closed List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , =?UTF-8?q?Juha=20Riihim=C3=A4ki?= 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=C3=A4ki. Signed-off-by: Andreas F=C3=A4rber Cc: Juha Riihim=C3=A4ki --- 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); } =20 +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *= )theApplication +{ + return YES; +} + - (void)startEmulationWithArgc:(int)argc argv:(char**)argv { COCOA_DEBUG("QemuCocoaAppController: startEmulationWithArgc\n"); --=20 1.6.5.3