From f2d652ff9529df55fdbb922358483d55a5bad084 Mon Sep 17 00:00:00 2001 From: Dag Heyman Date: Mon, 14 Aug 2017 12:53:28 +0200 Subject: [PATCH] systray: remove double-click support on macos --- main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.cpp b/main.cpp index f991375b..6eb4c6fa 100644 --- a/main.cpp +++ b/main.cpp @@ -96,12 +96,13 @@ int main(int argc, char *argv[]) trayIconMenu->addAction(quitAction); trayIcon->setContextMenu(trayIconMenu); trayIcon->setToolTip("Yubico Authenticator"); - // Double-click have same behavior as show credentials. - root->connect(trayIcon,SIGNAL(doubleClicked()), qmlWindow,SLOT(hide())); + #ifndef Q_OS_DARWIN + // Double-click should show credentials. + // Double-click in systemtray icons is not supported on macOS. root->connect(trayIcon,SIGNAL(doubleClicked()), qmlWindow,SLOT(show())); root->connect(trayIcon,SIGNAL(doubleClicked()), qmlWindow,SLOT(raise())); root->connect(trayIcon,SIGNAL(doubleClicked()), qmlWindow,SLOT(requestActivate())); - + #endif #ifndef Q_OS_DARWIN // Wake up the root window on a message from new instance.