From 1577bef63662b9fec3fb7b8a2e31a544a2d76e1e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 14 Aug 2016 15:20:11 +0200 Subject: gui: fix main window restored from tray being minimized Reported-by: @albertolg Issue: #410 --- gui/main-window.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gui/main-window.cpp b/gui/main-window.cpp index 70652201..7915be20 100644 --- a/gui/main-window.cpp +++ b/gui/main-window.cpp @@ -659,8 +659,13 @@ void MainWindow::toggle_restore_from_tray(QSystemTrayIcon::ActivationReason e) setVisible(is_minimized); setHidden(!is_minimized); - if (!is_minimized) - setWindowState(Qt::WindowNoState); + setWindowState(progn( + using ws = Qt::WindowStates; + if (is_minimized) + return ws(windowState() & (~Qt::WindowMinimized)); + else + return ws(Qt::WindowNoState); + )); if (is_minimized) { -- cgit v1.2.3