From cc6f5c3226867a05d3fdc72cd4e87b8618611b34 Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Wed, 24 Mar 2021 17:02:49 +0100 Subject: [PATCH] MinimizeAfterUnlock also when unlocking through browser The MinimizeAfterUnlock setting added in #3439 closes the main window after unlock. However, when the unlock is triggered through KeePassXC-Browser, a password dialog is shown on top of the main window and the main window remains open after the unlock. This is fixed in this commit. --- src/gui/DatabaseWidget.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/DatabaseWidget.cpp b/src/gui/DatabaseWidget.cpp index b80aa50ed..ada611d37 100644 --- a/src/gui/DatabaseWidget.cpp +++ b/src/gui/DatabaseWidget.cpp @@ -1178,6 +1178,10 @@ void DatabaseWidget::unlockDatabase(bool accepted) sshAgent()->databaseUnlocked(m_db); #endif + if (config()->get(Config::MinimizeAfterUnlock).toBool()) { + getMainWindow()->minimizeOrHide(); + } + if (senderDialog && senderDialog->intent() == DatabaseOpenDialog::Intent::AutoType) { QList> dbList; dbList.append(m_db);