mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-27 16:29:44 -05:00
Lower the main window after unlock request from extension (#1884)
This commit is contained in:
parent
635d6fe82c
commit
963ac75389
@ -47,7 +47,8 @@ static int KEEPASSXCBROWSER_DEFAULT_ICON = 1;
|
||||
|
||||
BrowserService::BrowserService(DatabaseTabWidget* parent) :
|
||||
m_dbTabWidget(parent),
|
||||
m_dialogActive(false)
|
||||
m_dialogActive(false),
|
||||
m_bringToFrontRequested(false)
|
||||
{
|
||||
connect(m_dbTabWidget, SIGNAL(databaseLocked(DatabaseWidget*)), this, SLOT(databaseLocked(DatabaseWidget*)));
|
||||
connect(m_dbTabWidget, SIGNAL(databaseUnlocked(DatabaseWidget*)), this, SLOT(databaseUnlocked(DatabaseWidget*)));
|
||||
@ -82,6 +83,7 @@ bool BrowserService::openDatabase(bool triggerUnlock)
|
||||
|
||||
if (triggerUnlock) {
|
||||
KEEPASSXC_MAIN_WINDOW->bringToFront();
|
||||
m_bringToFrontRequested = true;
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -743,6 +745,10 @@ void BrowserService::databaseLocked(DatabaseWidget* dbWidget)
|
||||
void BrowserService::databaseUnlocked(DatabaseWidget* dbWidget)
|
||||
{
|
||||
if (dbWidget) {
|
||||
if (m_bringToFrontRequested) {
|
||||
KEEPASSXC_MAIN_WINDOW->lower();
|
||||
m_bringToFrontRequested = false;
|
||||
}
|
||||
emit databaseUnlocked();
|
||||
}
|
||||
}
|
||||
|
@ -78,6 +78,7 @@ private:
|
||||
private:
|
||||
DatabaseTabWidget* const m_dbTabWidget;
|
||||
bool m_dialogActive;
|
||||
bool m_bringToFrontRequested;
|
||||
};
|
||||
|
||||
#endif // BROWSERSERVICE_H
|
||||
|
Loading…
Reference in New Issue
Block a user