Allow keep running option on macOS too

This commit is contained in:
Jonas Kvinge
2021-04-10 08:22:08 +02:00
parent a36b91ffe8
commit c7bc9d471a
2 changed files with 9 additions and 9 deletions

View File

@@ -1561,16 +1561,12 @@ void MainWindow::showEvent(QShowEvent *e) {
void MainWindow::closeEvent(QCloseEvent *e) {
#ifdef Q_OS_MACOS
Exit();
#else
if (!hidden_ && keep_running_ && e->spontaneous() && QSystemTrayIcon::isSystemTrayAvailable()) {
SetHiddenInTray(true);
}
else {
Exit();
}
#endif
QMainWindow::closeEvent(e);