From 5844616ea840e67850487ad6ca78988f92dd1b6f Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sat, 19 Oct 2019 02:21:20 +0200 Subject: [PATCH] Only ignore closeEvent when minimizing to system tray Fixes #277 --- src/core/mainwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) {