From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LQqB5-0006dk-Fv for qemu-devel@nongnu.org; Sat, 24 Jan 2009 16:36:31 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LQqB1-0006dU-Q9 for qemu-devel@nongnu.org; Sat, 24 Jan 2009 16:36:31 -0500 Received: from [199.232.76.173] (port=45092 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LQqB1-0006dP-Kf for qemu-devel@nongnu.org; Sat, 24 Jan 2009 16:36:27 -0500 Received: from cantor2.suse.de ([195.135.220.15]:54203 helo=mx2.suse.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LQqB1-0004fP-9w for qemu-devel@nongnu.org; Sat, 24 Jan 2009 16:36:27 -0500 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 9738F46CC8 for ; Sat, 24 Jan 2009 22:36:25 +0100 (CET) From: Alexander Graf Date: Sat, 24 Jan 2009 22:36:25 +0100 Message-Id: <1232832985-21402-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH] Don't show cocoa window when it's unused Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org While working with Qemu on Mac OS X I got really annoyed by it showing a window every time I start it with -nographic or -vnc. This patch (uglyly) checks if we need to show that window at all and if not behaves the same way the non-cocoa version does. Signed-off-by: Alexander Graf --- cocoa.m | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/cocoa.m b/cocoa.m index fe13952..9398507 100644 --- a/cocoa.m +++ b/cocoa.m @@ -853,6 +853,21 @@ int main (int argc, const char * argv[]) { gArgc = argc; gArgv = (char **)argv; CPSProcessSerNum PSN; + int noCocoa = 0; + int i; + + /* In case we don't need to display a window, let's not do that */ + for (i=1; i