--- eiskaltdcpp-qt/src/EiskaltApp_mac.h 2023-04-29 19:01:20.000000000 +0800 +++ eiskaltdcpp-qt/src/EiskaltApp_mac.h.orig 2023-05-25 03:43:54.000000000 +0800 @@ -28,7 +28,7 @@ void clickedOnDock(); public: - EiskaltEventFilter(): counter(0), has_activity(true), prevAppState(Qt::ApplicationHidden) { + EiskaltEventFilter(): counter(0), has_activity(true) { timer.setInterval(60000); connect(&timer, SIGNAL(timeout()), this, SLOT(tick())); @@ -54,15 +54,6 @@ break; } - case QEvent::ApplicationStateChange: - { - // https://stackoverflow.com/questions/15143369/qt-on-os-x-how-to-detect-clicking-the-app-dock-icon/46488514#46488514 - QApplicationStateChangeEvent *ev = static_cast(event); - if (prevAppState == Qt::ApplicationActive && ev->applicationState() == Qt::ApplicationActive) { - emit clickedOnDock(); - } - prevAppState = ev->applicationState(); - } default: { has_activity = false; @@ -98,7 +89,6 @@ QTimer timer; int counter; bool has_activity; - Qt::ApplicationState prevAppState; }; class EiskaltApp: public QtSingleCoreApplication{