mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-06-30 17:37:36 -04:00
Save the geometry of main window only if the window is visible
This commit is contained in:
parent
e100ba8362
commit
ffe344ce90
1 changed files with 4 additions and 1 deletions
|
@ -727,7 +727,9 @@ void MainWindow::changeEvent(QEvent* event)
|
||||||
|
|
||||||
void MainWindow::saveWindowInformation()
|
void MainWindow::saveWindowInformation()
|
||||||
{
|
{
|
||||||
config()->set("GUI/MainWindowGeometry", saveGeometry());
|
if (isVisible()) {
|
||||||
|
config()->set("GUI/MainWindowGeometry", saveGeometry());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MainWindow::saveLastDatabases()
|
bool MainWindow::saveLastDatabases()
|
||||||
|
@ -858,6 +860,7 @@ void MainWindow::trayIconTriggered(QSystemTrayIcon::ActivationReason reason)
|
||||||
|
|
||||||
void MainWindow::hideWindow()
|
void MainWindow::hideWindow()
|
||||||
{
|
{
|
||||||
|
saveWindowInformation();
|
||||||
#ifndef Q_OS_MAC
|
#ifndef Q_OS_MAC
|
||||||
setWindowState(windowState() | Qt::WindowMinimized);
|
setWindowState(windowState() | Qt::WindowMinimized);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue