From: A. V. Lukyanov Date: Wed, 3 Aug 2016 02:16:29 +0000 (+0300) Subject: On OS X restore from dock X-Git-Tag: 0.12.5~58 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=b52e1855af9bcb0bbe32c2143a7ebb2bf695ffc0 On OS X restore from dock (cherry picked from commit c67fec44128f48c1ac2ab7ef2b6f73a27fb67f66) --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a05ed52..7bff2f1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,6 +87,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 d1e106d1..10f37902 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 + } }