From e3946b443502abec5f8d795e78fb37c58a4130f9 Mon Sep 17 00:00:00 2001 From: PKEv Date: Sat, 14 Mar 2015 23:06:33 +0300 Subject: [PATCH] #1379 correct --- src/widget/widget.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index 2bc828c42..f514359c3 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -459,23 +459,30 @@ void Widget::onIconClick(QSystemTrayIcon::ActivationReason reason) { show(); activateWindow(); + showNormal(); } else if (isMinimized()) { forceShow(); + activateWindow(); + showNormal(); } else { - hide(); + if (Settings::getInstance().getMinimizeToTray()) + hide(); + else + showMinimized(); + break; } break; } - case QSystemTrayIcon::DoubleClick: - forceShow(); - break; case QSystemTrayIcon::MiddleClick: - hide(); + if (Settings::getInstance().getMinimizeToTray()) + hide(); + else + showMinimized(); break; case QSystemTrayIcon::Unknown: if (isHidden())