From 438172bef9366314915a2a91ca1fcd4beb770167 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 a91d15b3b..0f0037ced 100644 --- a/src/gui/DatabaseWidget.cpp +++ b/src/gui/DatabaseWidget.cpp @@ -1176,6 +1176,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);