From d26179cca03f05db50fef9e308c2264edbc992d0 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Wed, 27 Jun 2012 17:46:26 +0300 Subject: [PATCH] Fix window visibility toggling bug with "minimized to systray" enabled The issue seemed to affect Windows only. --- src/mainwindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index bad3fd6b6..c47ae0480 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -702,9 +702,10 @@ void MainWindow::toggleVisibility(QSystemTrayIcon::ActivationReason e) { if (!unlockUI()) return; } + // Make sure the window is not minimized + setWindowState(windowState() & ~Qt::WindowMinimized | Qt::WindowActive); + // Then show it show(); - raise(); - activateWindow(); }else{ hide(); }