diff --git a/src/core/mainwindow.cpp b/src/core/mainwindow.cpp index 86ce333a1..cc3ec3def 100644 --- a/src/core/mainwindow.cpp +++ b/src/core/mainwindow.cpp @@ -1330,12 +1330,12 @@ void MainWindow::closeEvent(QCloseEvent *event) { settings.endGroup(); if (keep_running && event->spontaneous() && QSystemTrayIcon::isSystemTrayAvailable()) { + event->ignore(); SetHiddenInTray(true); } else { Exit(); } - event->ignore(); } @@ -1352,6 +1352,7 @@ void MainWindow::SetHiddenInTray(bool hidden) { if (was_maximized_) showMaximized(); else show(); } + } void MainWindow::FilePathChanged(const QString &path) {