summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gui/main-window.cpp9
1 files 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)
{