[wx-dev] [MacOS] How to force an app to foreground?

Stefan.Neis at t-online.de Stefan.Neis at t-online.de
Thu Feb 7 08:33:56 PST 2008


        Hi,

> The problem is that this is part of the handshake between launch
> services and the application.  It is only appropriate to break this
> handshake when you are not starting via launch services which is the
> case when you run the app from the command-line.


> It's actually a benefit that the app doesn't activate itself. 
(explanation snipped)

I see, although I wonder, how many Macs that are still in
use are that slow ... ;-)

> Please don't blindly add this code to wx startup.  The current
> behavior is very intentional and is not a bug.  Launch Services is
> supposed to activate the app at its discretion, based on various
> factors including user input that your application is not privy to.

So what would you suggest? Only add it, when the program has
arguments? Or (assuming you can find out that it was started from
the command line) whenever it was started from the command line?

Or only, when the programmer specifically asks for it? Anyway,
IMO it would be really great to have the code in wx generally
available, as currently it's quite hard to find out what you need to
do, when you need that changed behaviour...

         Regards,
                 Stefan







More information about the wx-dev mailing list