systray: remove double-click support on macos

This commit is contained in:
Dag Heyman 2017-08-14 12:53:28 +02:00
parent d3d78ab0e7
commit f2d652ff95
No known key found for this signature in database
GPG Key ID: 06FC004369E7D338

View File

@ -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.