Fix focusing search after database unlock

* Fixes #10405
This commit is contained in:
Jonathan White 2024-03-17 10:16:28 -04:00
parent 0b71cb1dad
commit deb0926497
No known key found for this signature in database
GPG Key ID: 440FC65F2E0C6E01

View File

@ -615,10 +615,16 @@ void DatabaseOpenWidget::toggleQuickUnlockScreen()
{
if (canPerformQuickUnlock()) {
m_ui->centralStack->setCurrentIndex(1);
m_ui->quickUnlockButton->setFocus();
// Work around qt issue where focus is stolen even if not visible
if (m_ui->quickUnlockButton->isVisible()) {
m_ui->quickUnlockButton->setFocus();
}
} else {
m_ui->centralStack->setCurrentIndex(0);
m_ui->editPassword->setFocus();
// Work around qt issue where focus is stolen even if not visible
if (m_ui->editPassword->isVisible()) {
m_ui->editPassword->setFocus();
}
}
}