summaryrefslogtreecommitdiffhomepage
path: root/gui
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-08-10 12:26:40 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-08-10 12:26:40 +0200
commit3afb96603b1c213b5b85689f807a9384f24ada96 (patch)
tree63bfba8fc8301dd0e69627c8e59da2d3167747e8 /gui
parentdf02fbeb1650c3f757c4d463c8bfb5d208ab9da6 (diff)
gui: make both single and double click work for tray toggle
Issue: #410 Reported-by: @Len62
Diffstat (limited to 'gui')
-rw-r--r--gui/main-window.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/gui/main-window.cpp b/gui/main-window.cpp
index 21e5a3b4..e2a67e80 100644
--- a/gui/main-window.cpp
+++ b/gui/main-window.cpp
@@ -575,7 +575,16 @@ void MainWindow::ensure_tray()
void MainWindow::toggle_restore_from_tray(QSystemTrayIcon::ActivationReason e)
{
- if (e != QSystemTrayIcon::DoubleClick)
+ if (progn(switch (e)
+ {
+ // if we enable double click also then it causes
+ // toggle back to the original state
+ //case QSystemTrayIcon::DoubleClick:
+ case QSystemTrayIcon::Trigger: // single click
+ return false;
+ default:
+ return true;
+ }))
return;
ensure_tray();