From: "Andreas Färber" <andreas.faerber@web.de>
To: qemu-devel@nongnu.org
Cc: "Andreas Färber" <andreas.faerber@web.de>,
"Mike Kronenberg" <mike.kronenberg@kronenberg.org>,
"Alexander Graf" <agraf@suse.de>
Subject: [Qemu-devel] [PATCH v2 RESEND 08/11] Cocoa: Don't unconditionally show the window
Date: Wed, 6 Jan 2010 23:47:14 +0100 [thread overview]
Message-ID: <1262818037-926-9-git-send-email-andreas.faerber@web.de> (raw)
In-Reply-To: <1262818037-926-8-git-send-email-andreas.faerber@web.de>
When QEMU was launched in no-graphic, Curses or VNC mode,
don't run it as a Cocoa application.
Based on patch by Alexander Graf.
v1:
- Avoid type mismatch warning for argv
- Drop noCocoa variable
- Coding Style changes
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Cc: Alexander Graf <agraf@suse.de>
Cc: Mike Kronenberg <mike.kronenberg@kronenberg.org>
---
cocoa.m | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/cocoa.m b/cocoa.m
index d5f941b..70c249b 100644
--- a/cocoa.m
+++ b/cocoa.m
@@ -855,6 +855,16 @@ int main (int argc, const char * argv[]) {
gArgc = argc;
gArgv = (char **)argv;
CPSProcessSerNum PSN;
+ int i;
+
+ /* In case we don't need to display a window, let's not do that */
+ for (i = 1; i < argc; i++) {
+ if (!strcmp(argv[i], "-vnc") ||
+ !strcmp(argv[i], "-nographic") ||
+ !strcmp(argv[i], "-curses")) {
+ return qemu_main(gArgc, gArgv);
+ }
+ }
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
[NSApplication sharedApplication];
--
1.6.5.3
next prev parent reply other threads:[~2010-01-06 22:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-06 22:47 [Qemu-devel] [PATCH v2 RESEND 00/11] Cocoa: ppc64 host support and various improvements Andreas Färber
2010-01-06 22:47 ` [Qemu-devel] [PATCH v2 RESEND 01/11] Cocoa: ppc64 host support Andreas Färber
2010-01-06 22:47 ` [Qemu-devel] [PATCH v2 RESEND 02/11] Cocoa: Silence warning for cocoa_keycode_to_qemu Andreas Färber
2010-01-06 22:47 ` [Qemu-devel] [PATCH v2 RESEND 03/11] Cocoa: Silence warning on Big Endian host Andreas Färber
2010-01-06 22:47 ` [Qemu-devel] [PATCH v2 RESEND 04/11] Cocoa: Silence type warning Andreas Färber
2010-01-06 22:47 ` [Qemu-devel] [PATCH v2 RESEND 05/11] Cocoa: Fix compilation on Mac OS X v10.4 and earlier Andreas Färber
2010-01-06 22:47 ` [Qemu-devel] [PATCH v2 RESEND 06/11] Cocoa: Mark the View as opaque Andreas Färber
2010-01-06 22:47 ` [Qemu-devel] [PATCH v2 RESEND 07/11] Cocoa: Redraw the View asynchronously Andreas Färber
2010-01-06 22:47 ` Andreas Färber [this message]
2010-01-06 22:47 ` [Qemu-devel] [PATCH v2 RESEND 09/11] Cocoa: Shutdown when window is closed Andreas Färber
2010-01-06 22:47 ` [Qemu-devel] [PATCH v2 RESEND 10/11] Cocoa: Suppress window resize animation Andreas Färber
2010-01-06 22:47 ` [Qemu-devel] [PATCH v2 RESEND 11/11] Cocoa: Use optimized drawing for the window Andreas Färber
2010-01-06 22:49 ` [Qemu-devel] Re: [PATCH v2 RESEND 08/11] Cocoa: Don't unconditionally show " Alexander Graf
2010-01-06 23:18 ` Andreas Färber
2010-01-06 23:23 ` Alexander Graf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1262818037-926-9-git-send-email-andreas.faerber@web.de \
--to=andreas.faerber@web.de \
--cc=agraf@suse.de \
--cc=mike.kronenberg@kronenberg.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).