From d7eb29ab716fed01aa963f578cd2f907442d3d69 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 9eb3d1bdb..72996b5e5 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -701,9 +701,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(); }