Re: [Qemu-devel] [PATCH V2 2/3] Cocoa: avoid displaying window when command-line contains '-h' or '-help'

2011-06-01 Thread Peter Maydell
On 2 June 2011 00:05, Andreas Färber wrote: > Am 30.05.2011 um 00:32 schrieb Peter Maydell: >> (1) presumably this doesn't work if you disable the display >> with "-display none" ? > > I don't see how that would not work. It's just not handled specially here, > so it will likely display a window -

Re: [Qemu-devel] [PATCH V2 2/3] Cocoa: avoid displaying window when command-line contains '-h' or '-help'

2011-06-01 Thread Andreas Färber
Am 30.05.2011 um 00:32 schrieb Peter Maydell: On 29 May 2011 23:22, Alexandre Raymond wrote: diff --git a/ui/cocoa.m b/ui/cocoa.m index 1ff1ac6..e1312d3 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -872,7 +872,8 @@ int main (int argc, const char * argv[]) { if (opt[1] == '-') {

Re: [Qemu-devel] [PATCH V2 2/3] Cocoa: avoid displaying window when command-line contains '-h' or '-help'

2011-06-01 Thread Andreas Färber
Am 30.05.2011 um 00:22 schrieb Alexandre Raymond: There was already a check in place to avoid displaying a window in certain modes such as vnc, nographic or curses. Add a check for '-h' and '-help' to avoid displaying a window for a split- second before showing the usage information. Signed

Re: [Qemu-devel] [PATCH V2 2/3] Cocoa: avoid displaying window when command-line contains '-h' or '-help'

2011-05-29 Thread Alexandre Raymond
I agree that this is not the best way to handle all cases not requiring a GUI. However, due to the current structure of the code, it was a simple way to cover a very common case without having to refactor the whole cocoa code. Alexandre On Sun, May 29, 2011 at 6:32 PM, Peter Maydell wrote: > On

Re: [Qemu-devel] [PATCH V2 2/3] Cocoa: avoid displaying window when command-line contains '-h' or '-help'

2011-05-29 Thread Peter Maydell
On 29 May 2011 23:22, Alexandre Raymond wrote: > diff --git a/ui/cocoa.m b/ui/cocoa.m > index 1ff1ac6..e1312d3 100644 > --- a/ui/cocoa.m > +++ b/ui/cocoa.m > @@ -872,7 +872,8 @@ int main (int argc, const char * argv[]) { >             if (opt[1] == '-') { >                 opt++; >             } >

[Qemu-devel] [PATCH V2 2/3] Cocoa: avoid displaying window when command-line contains '-h' or '-help'

2011-05-29 Thread Alexandre Raymond
There was already a check in place to avoid displaying a window in certain modes such as vnc, nographic or curses. Add a check for '-h' and '-help' to avoid displaying a window for a split- second before showing the usage information. Signed-off-by: Alexandre Raymond --- ui/cocoa.m |3 ++-