[KDE/Mac] making applications "launch in the foreground"
"René J.V. Bertin"
rjvbertin at gmail.com
Wed Jul 2 14:48:03 UTC 2014
I saw a patch for DrKonqi that ensures its dialog appears in the foreground on OS X, and not somewhere behind the other open (or crashed) applications. It uses the easiest solution: bring the dialog to the foreground after opening it. That's a valid approach in this case (probably not just on OS X), but the underlying reason applications open in the background appears to be an OS X default when system(), execve() or similar are used. Even OS X's own app bundles open behind the calling Terminal.app window.
I've uploaded an example to a bug report about non-foreground kwallet windows that I created a while ago: https://bugs.kde.org/show_bug.cgi?id=335881#c3
It uses code I found on StackExchange, and can easily be adapted to implement a drop-in replacement on OS X for system(), execve() or whatever posixy function is used to spawn a required application.
More information about the kde-mac