This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: popup consoles on Windows 7
- From: Andy Koppe <andy dot koppe at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 26 Jun 2009 10:39:27 +0100
- Subject: Re: popup consoles on Windows 7
- References: <416096c60904051420h66325080j3b059f3fbb857bde@mail.gmail.com> <20090415153549.GA8722@calimero.vinschen.de> <416096c60904151350p62741e29if5c46598951d8dd9@mail.gmail.com> <416096c60904151415k6998673dw2ddf867653ae88e8@mail.gmail.com> <20090416092528.GB8722@calimero.vinschen.de> <416096c60904210835jd93a1b8w742bb8ebe0802c9c@mail.gmail.com> <20090421160026.GJ8722@calimero.vinschen.de> <20090508090737.GA15230@calimero.vinschen.de> <416096c60905131134l21aa53dqe7c3f99130dddb4e@mail.gmail.com> <20090626083640.GF30864@calimero.vinschen.de>
2009/6/26 Corinna Vinschen
> The issue will definitely not be fixed in RTM. ÂOh well.
:(
> We will have
> to find a W7 workaround for our method of creating a hidden console. ÂI
> have asked Microsoft to provide us with a workaround but I have no
> really big hope that they can or will do it. ÂAny suggestions?
The proper, yet probably completely impractical solution: compile
Cygwin programs for the GUI subsystem instead of the console one and
attach to the parent process' console, if any, with explicit calls at
program startup. POSIX programs don't use the Win32 console API, so
there should be no need to always have a console available.
Otherwise:
DWORD version = GetVersion();
version = ((version & 0xff) << 8) | ((version >> 8) & 0xff);
if (version >= 0x0601 && AllocConsole())
ShowWindowAsync(GetConsoleWindow(), SW_HIDE);
Still looks bad though, with "subliminal" popups, as demonstrated by
mintty on Windows 7.
Andy
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple