summarylogtreecommitdiffstats
path: root/close-fix.diff
diff options
context:
space:
mode:
authorzan2020-07-20 18:26:39 -0400
committerzan2020-07-20 18:26:39 -0400
commit8c3b57453b61c08aade185d911597f4b23bb7815 (patch)
treed9e7cdd6ea7ab66095296af0225c887bce6742eb /close-fix.diff
parent42fdc216d5ca5a42ccc11f08337dc83734b8cc7f (diff)
downloadaur-8c3b57453b61c08aade185d911597f4b23bb7815.tar.gz
Apply patch to fix upstream issue 6401
Diffstat (limited to 'close-fix.diff')
-rw-r--r--close-fix.diff37
1 files changed, 37 insertions, 0 deletions
diff --git a/close-fix.diff b/close-fix.diff
new file mode 100644
index 000000000000..2b931508c52f
--- /dev/null
+++ b/close-fix.diff
@@ -0,0 +1,37 @@
+diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp
+index 14921028c..a02f0548c 100644
+--- a/src/ui/mainwindow.cpp
++++ b/src/ui/mainwindow.cpp
+@@ -1443,20 +1443,6 @@ void MainWindow::StopAfterCurrent() {
+ app_->playlist_manager()->active()->stop_after_current());
+ }
+
+-void MainWindow::closeEvent(QCloseEvent* event) {
+- bool keep_running(false);
+- if (tray_icon_)
+- keep_running =
+- settings_.value("keeprunning", tray_icon_->IsVisible()).toBool();
+-
+- if (keep_running && event->spontaneous()) {
+- event->ignore();
+- SetHiddenInTray(true);
+- } else {
+- Exit();
+- }
+-}
+-
+ void MainWindow::SetHiddenInTray(bool hidden) {
+ settings_.setValue("hidden", hidden);
+
+diff --git a/src/ui/mainwindow.h b/src/ui/mainwindow.h
+index 5b2983bb4..756f33a47 100644
+--- a/src/ui/mainwindow.h
++++ b/src/ui/mainwindow.h
+@@ -134,7 +134,6 @@ class MainWindow : public QMainWindow, public PlatformInterface {
+ void keyPressEvent(QKeyEvent* event);
+ void changeEvent(QEvent*);
+ void resizeEvent(QResizeEvent*);
+- void closeEvent(QCloseEvent* event);
+
+ #ifdef Q_OS_WIN32
+ bool winEvent(MSG* message, long* result);