From 1d79d379c9d97188405695855525d4c57b002ea7 Mon Sep 17 00:00:00 2001 From: sniperbeamer Date: Fri, 8 Jan 2010 16:12:20 +0000 Subject: [PATCH] Maximized state not saved when minimizing to tray [Windows] (Bug #2926367) git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@358 b624d157-de02-0410-bad0-e51aec6abb33 --- src/mainwindow.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 4b699e4..7ae85e3 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1254,7 +1254,14 @@ void KeepassMainWindow::OnSysTrayActivated(QSystemTrayIcon::ActivationReason rea } void KeepassMainWindow::restoreWindow(){ +#ifdef Q_WS_WIN + if (windowState() & Qt::WindowMaximized) + showMaximized(); + else + showNormal(); +#else showNormal(); +#endif activateWindow(); if (IsLocked) OnUnLockWorkspace();