mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Exit when receiving OS Close Message when in tray
* Fixes #2692 * KeePassXC was ignoring OS close messages on shutdown or logoff when minimize to tray on close was enabled. This change causes a second close message (when KeePassXC is hidden to the tray) to actually exit the application.
This commit is contained in:
parent
6f443ee9fc
commit
a747886323
@ -874,7 +874,9 @@ void MainWindow::closeEvent(QCloseEvent* event)
|
||||
return;
|
||||
}
|
||||
|
||||
if (config()->get("GUI/MinimizeOnClose").toBool() && !m_appExitCalled) {
|
||||
// Don't ignore close event when the app is hidden to tray.
|
||||
// This can occur when the OS issues close events on shutdown.
|
||||
if (config()->get("GUI/MinimizeOnClose").toBool() && !isHidden() && !m_appExitCalled) {
|
||||
event->ignore();
|
||||
hideWindow();
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user