From 90347141bdb4020875c55ff51375aada46a1a4d9 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Wed, 31 Oct 2018 21:15:31 +0200 Subject: Use Qt signal for macOS Dock icon click event This moves the Dock icon click reaction code to the common place and allows some cleanup in obj_c code. According to the Apple's docs `class_replaceMethod` behaves as `class_addMethod`, if the method identified by name does not yet exist; or as `method_setImplementation`, if it does exist. Github-Pull: #14597 Rebased-From: 2464925e7be832d4926b6204169bbbc1646c6368 --- src/qt/bitcoingui.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/qt/bitcoingui.h') diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h index c14265cc9c..f4b1bf18ee 100644 --- a/src/qt/bitcoingui.h +++ b/src/qt/bitcoingui.h @@ -250,6 +250,9 @@ private 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 */ -- cgit v1.2.3