mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-28 08:49:42 -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) :
|
BrowserService::BrowserService(DatabaseTabWidget* parent) :
|
||||||
m_dbTabWidget(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(databaseLocked(DatabaseWidget*)), this, SLOT(databaseLocked(DatabaseWidget*)));
|
||||||
connect(m_dbTabWidget, SIGNAL(databaseUnlocked(DatabaseWidget*)), this, SLOT(databaseUnlocked(DatabaseWidget*)));
|
connect(m_dbTabWidget, SIGNAL(databaseUnlocked(DatabaseWidget*)), this, SLOT(databaseUnlocked(DatabaseWidget*)));
|
||||||
@ -82,6 +83,7 @@ bool BrowserService::openDatabase(bool triggerUnlock)
|
|||||||
|
|
||||||
if (triggerUnlock) {
|
if (triggerUnlock) {
|
||||||
KEEPASSXC_MAIN_WINDOW->bringToFront();
|
KEEPASSXC_MAIN_WINDOW->bringToFront();
|
||||||
|
m_bringToFrontRequested = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -743,6 +745,10 @@ void BrowserService::databaseLocked(DatabaseWidget* dbWidget)
|
|||||||
void BrowserService::databaseUnlocked(DatabaseWidget* dbWidget)
|
void BrowserService::databaseUnlocked(DatabaseWidget* dbWidget)
|
||||||
{
|
{
|
||||||
if (dbWidget) {
|
if (dbWidget) {
|
||||||
|
if (m_bringToFrontRequested) {
|
||||||
|
KEEPASSXC_MAIN_WINDOW->lower();
|
||||||
|
m_bringToFrontRequested = false;
|
||||||
|
}
|
||||||
emit databaseUnlocked();
|
emit databaseUnlocked();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -78,6 +78,7 @@ private:
|
|||||||
private:
|
private:
|
||||||
DatabaseTabWidget* const m_dbTabWidget;
|
DatabaseTabWidget* const m_dbTabWidget;
|
||||||
bool m_dialogActive;
|
bool m_dialogActive;
|
||||||
|
bool m_bringToFrontRequested;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // BROWSERSERVICE_H
|
#endif // BROWSERSERVICE_H
|
||||||
|
Loading…
Reference in New Issue
Block a user