mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-03-15 19:06:09 -04:00
Merge pull request #1146 from frostasm/save-main-window-geometry-only-if-window-visible
Save the geometry of main window only if the window is visible
This commit is contained in:
commit
4e6a171a42
@ -727,7 +727,9 @@ void MainWindow::changeEvent(QEvent* event)
|
||||
|
||||
void MainWindow::saveWindowInformation()
|
||||
{
|
||||
config()->set("GUI/MainWindowGeometry", saveGeometry());
|
||||
if (isVisible()) {
|
||||
config()->set("GUI/MainWindowGeometry", saveGeometry());
|
||||
}
|
||||
}
|
||||
|
||||
bool MainWindow::saveLastDatabases()
|
||||
@ -858,6 +860,7 @@ void MainWindow::trayIconTriggered(QSystemTrayIcon::ActivationReason reason)
|
||||
|
||||
void MainWindow::hideWindow()
|
||||
{
|
||||
saveWindowInformation();
|
||||
#ifndef Q_OS_MAC
|
||||
setWindowState(windowState() | Qt::WindowMinimized);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user