diff --git a/src/libaudqt/audqt.cc b/src/libaudqt/audqt.cc index 456214bc8..d93e92570 100644 --- a/src/libaudqt/audqt.cc +++ b/src/libaudqt/audqt.cc @@ -28,6 +28,7 @@ #include #include +#include #include #include "libaudqt-internal.h" @@ -181,10 +182,17 @@ EXPORT void init() // to use 9 pt in most places so let's try to do the same. QApplication::setFont(QApplication::font("QMenu")); #endif -#ifdef Q_OS_MAC // Mac-specific font tweaks +#ifdef Q_OS_MAC + // Mac-specific font tweaks QApplication::setFont(QApplication::font("QSmallFont"), "QDialog"); QApplication::setFont(QApplication::font("QSmallFont"), "QTreeView"); QApplication::setFont(QApplication::font("QTipLabel"), "QStatusBar"); + + // Handle MacOS dock activation (AppKit applicationShouldHandleReopen) + QObject::connect(qapp, &QApplication::applicationStateChanged, [](auto state) { + if (state == Qt::ApplicationState::ApplicationActive) + aud_ui_show(true); + }); #endif }