X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fgraphicalui.cpp;h=3d3c3b6b9d0d44f2e516723a536a017b33c8ce58;hp=d1e106d10722c335c9363b749d9b7caf2440e7c3;hb=efee441a243efb88929e1e275d71ee27991bf074;hpb=d82f98b8cf9c7c83f3aab1d7f010ccf8bdd2c003 diff --git a/src/uisupport/graphicalui.cpp b/src/uisupport/graphicalui.cpp index d1e106d1..3d3c3b6b 100644 --- a/src/uisupport/graphicalui.cpp +++ b/src/uisupport/graphicalui.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 by the Quassel Project * + * Copyright (C) 2005-2016 by the Quassel Project * * devel@quassel-irc.org * * * * This contains code from KStatusNotifierItem, part of the KDE libs * @@ -52,6 +52,9 @@ GraphicalUi::GraphicalUi(QObject *parent) : AbstractUi(parent) #ifdef Q_OS_WIN _dwTickCount = 0; #endif +#ifdef Q_OS_MAC + GetFrontProcess(&_procNum); +#endif } @@ -299,9 +302,13 @@ void GraphicalUi::activateMainWidget() // this does not actually work on all platforms... and causes more evil than good // mainWidget()->move(mainWidget()->frameGeometry().topLeft()); // avoid placement policies +#ifdef Q_OS_MAC + SetFrontProcess(&instance()->_procNum); +#else mainWidget()->show(); mainWidget()->raise(); mainWidget()->activateWindow(); +#endif #endif /* HAVE_KDE4 */ } @@ -315,7 +322,11 @@ void GraphicalUi::hideMainWidget() #endif if (instance()->isHidingMainWidgetAllowed()) +#ifdef Q_OS_MAC + ShowHideProcess(&instance()->_procNum, false); +#else mainWidget()->hide(); +#endif }