mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-02-17 13:02:49 -05: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;
|
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();
|
event->ignore();
|
||||||
hideWindow();
|
hideWindow();
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user