Skip to content

Commit

Permalink
Fix hiding main window after browser unlock request
Browse files Browse the repository at this point in the history
* The main window doesn't hide properly during unlock sequence if it is in the background (ie, not minimized and not hidden to tray). This change makes sure the window hides after interaction on all platforms.
  • Loading branch information
droidmonkey committed Aug 29, 2021
1 parent 53dcafa commit 0450bf3
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/browser/BrowserService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -814,11 +814,8 @@ QList<Entry*> BrowserService::confirmEntries(QList<Entry*>& pwEntriesToConfirm,
}
}

#ifdef Q_OS_MAC
// Re-hide the application if it wasn't visible before
// only affects macOS because dialogs force the main window to show
hideWindow();
#endif

m_dialogActive = false;

Expand Down Expand Up @@ -1306,12 +1303,10 @@ void BrowserService::databaseLocked(DatabaseWidget* dbWidget)
void BrowserService::databaseUnlocked(DatabaseWidget* dbWidget)
{
if (dbWidget) {
#ifdef Q_OS_MAC
if (m_bringToFrontRequested) {
m_bringToFrontRequested = false;
hideWindow();
}
#endif

QJsonObject msg;
msg["action"] = QString("database-unlocked");
Expand Down

0 comments on commit 0450bf3

Please sign in to comment.