From 1433a53960766168e4f67705a252374cc81a75ef Mon Sep 17 00:00:00 2001 From: David Sansome Date: Mon, 29 Mar 2010 13:24:40 +0000 Subject: [PATCH] Fix behaviour when clicking on the system tray when clementine is minimized. Thanks christoph.gysin. Fixes issue #133 --- src/mainwindow.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 6a84ccb6b..5757b62ef 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -462,7 +462,13 @@ void MainWindow::TrayClicked(QSystemTrayIcon::ActivationReason reason) { switch (reason) { case QSystemTrayIcon::DoubleClick: case QSystemTrayIcon::Trigger: - SetHiddenInTray(isVisible()); + if(isMinimized()) { + hide(); + setWindowState((windowState() & ~Qt::WindowMinimized) | Qt::WindowActive); + SetHiddenInTray(false); + } else { + SetHiddenInTray(isVisible()); + } break; case QSystemTrayIcon::MiddleClick: