From 2eae22ac0667fcea4ad56d6c9f1172db9b724c97 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 24 Jun 2012 16:25:44 +0300 Subject: [PATCH] Fix issue with unreversible "Minimize to tray" --- src/mainwindow.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index dcc5d4a2f..bad3fd6b6 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -703,13 +703,6 @@ void MainWindow::toggleVisibility(QSystemTrayIcon::ActivationReason e) { return; } show(); - if (isMinimized()) { - if (isMaximized()) { - showMaximized(); - }else{ - showNormal(); - } - } raise(); activateWindow(); }else{ @@ -819,7 +812,7 @@ bool MainWindow::event(QEvent * e) { // Iconify if there is no modal window if (!has_modal_window) { qDebug("Minimize to Tray enabled, hiding!"); - e->accept(); + e->ignore(); QTimer::singleShot(0, this, SLOT(hide())); return true; }