diff options
-rw-r--r-- | src/qt/bitcoingui.cpp | 11 | ||||
-rw-r--r-- | src/qt/bitcoingui.h | 3 |
2 files changed, 4 insertions, 10 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 0baacfe58c..ca351060fd 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -793,7 +793,10 @@ void BitcoinGUI::createTrayIconMenu() #else // Note: On macOS, the Dock icon is used to provide the tray's functionality. MacDockIconHandler *dockIconHandler = MacDockIconHandler::instance(); - connect(dockIconHandler, &MacDockIconHandler::dockIconClicked, this, &BitcoinGUI::macosDockIconActivated); + connect(dockIconHandler, &MacDockIconHandler::dockIconClicked, [this] { + show(); + activateWindow(); + }); trayIconMenu->setAsDockMenu(); #endif @@ -828,12 +831,6 @@ void BitcoinGUI::trayIconActivated(QSystemTrayIcon::ActivationReason reason) toggleHidden(); } } -#else -void BitcoinGUI::macosDockIconActivated() -{ - show(); - activateWindow(); -} #endif void BitcoinGUI::optionsClicked() diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h index 658ab5a210..ae9cb9f11d 100644 --- a/src/qt/bitcoingui.h +++ b/src/qt/bitcoingui.h @@ -305,9 +305,6 @@ public Q_SLOTS: #ifndef Q_OS_MAC /** Handle tray icon clicked */ void trayIconActivated(QSystemTrayIcon::ActivationReason reason); -#else - /** Handle macOS Dock icon clicked */ - void macosDockIconActivated(); #endif /** Show window if hidden, unminimize when minimized, rise when obscured or show if hidden and fToggleHidden is true */ |