From: A. V. Lukyanov Date: Wed, 3 Aug 2016 02:16:29 +0000 (+0300) Subject: On OS X restore from dock X-Git-Tag: travis-deploy-test~377 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=c67fec44128f48c1ac2ab7ef2b6f73a27fb67f66;hp=d499638e2350488b9029f27caed6e38c2dbde33f On OS X restore from dock --- diff --git a/CMakeLists.txt b/CMakeLists.txt index e0315273..b6ab7725 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -101,6 +101,9 @@ if (APPLE) option(WITH_NOTIFICATION_CENTER "OS X Notification Center support" ON) add_feature_info(WITH_NOTIFICATION_CENTER WITH_NOTIFICATION_CENTER "Use the OS X Notification Center") endif() + find_library(CARBON_LIBRARY Carbon) + mark_as_advanced(CARBON_LIBRARY) + link_libraries(${CARBON_LIBRARY}) endif() # Always embed on Windows, OSX or for a static build; never embed when enabling KDE integration diff --git a/src/uisupport/graphicalui.cpp b/src/uisupport/graphicalui.cpp index e79ce3f3..1bdf0478 100644 --- a/src/uisupport/graphicalui.cpp +++ b/src/uisupport/graphicalui.cpp @@ -35,6 +35,9 @@ # include # include #endif +#ifdef Q_OS_MAC +#include +#endif GraphicalUi *GraphicalUi::_instance = 0; QWidget *GraphicalUi::_mainWidget = 0; @@ -313,9 +316,18 @@ void GraphicalUi::hideMainWidget() KWindowInfo info = KWindowSystem::windowInfo(mainWidget()->winId(), NET::WMDesktop | NET::WMFrameExtents); _onAllDesktops = info.onAllDesktops(); #endif +#ifdef Q_OS_MAC + ProcessSerialNumber pn; +#endif - if (instance()->isHidingMainWidgetAllowed()) + if (instance()->isHidingMainWidgetAllowed()) { +#ifdef Q_OS_MAC + GetFrontProcess(&pn); + ShowHideProcess(&pn, false); +#else mainWidget()->hide(); +#endif + } }