summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2019-07-13 10:50:06 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2019-07-13 10:50:45 +0200
commit66e5a91fc96dd9acf01f84b458c7c4b39aa405bf (patch)
treec78083f2496d2b5e28fb787578caf8efe2c384b8 /media-sound/clementine/files
parentmedia-sound/clementine: 1.3.1_p20190609 snapshot bump (diff)
downloadgentoo-66e5a91fc96dd9acf01f84b458c7c4b39aa405bf.tar.gz
gentoo-66e5a91fc96dd9acf01f84b458c7c4b39aa405bf.tar.bz2
gentoo-66e5a91fc96dd9acf01f84b458c7c4b39aa405bf.zip
media-sound/clementine: Fix restore from systray with >=Qt-5.12.4
See upstream PR: https://github.com/clementine-player/Clementine/pull/6351 Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'media-sound/clementine/files')
-rw-r--r--media-sound/clementine/files/clementine-1.3.1_p20190609-fix-restore-from-systray.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/media-sound/clementine/files/clementine-1.3.1_p20190609-fix-restore-from-systray.patch b/media-sound/clementine/files/clementine-1.3.1_p20190609-fix-restore-from-systray.patch
new file mode 100644
index 000000000000..9f27e219e89d
--- /dev/null
+++ b/media-sound/clementine/files/clementine-1.3.1_p20190609-fix-restore-from-systray.patch
@@ -0,0 +1,34 @@
+From 1bf633e71b7b5d8e5965971036d66e1d18552b49 Mon Sep 17 00:00:00 2001
+From: Michael Niggli <m.niggli@gmail.com>
+Date: Fri, 31 May 2019 17:04:46 +0200
+Subject: [PATCH] Fix blank window when restoring from systray
+
+This applies the fix qBittorrent used for this same issue:
+https://github.com/qbittorrent/qBittorrent/issues/9240,
+so credit goes to those guys
+---
+ src/ui/mainwindow.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp
+index 2944d46ec..ad603fd64 100644
+--- a/src/ui/mainwindow.cpp
++++ b/src/ui/mainwindow.cpp
+@@ -1441,7 +1441,7 @@ void MainWindow::closeEvent(QCloseEvent* event) {
+ keep_running = s.value("keeprunning", tray_icon_->IsVisible()).toBool();
+
+ if (keep_running && event->spontaneous()) {
+- event->accept();
++ event->ignore();
+ SetHiddenInTray(true);
+ } else {
+ Exit();
+@@ -1454,7 +1454,7 @@ void MainWindow::SetHiddenInTray(bool hidden) {
+ // Some window managers don't remember maximized state between calls to
+ // hide() and show(), so we have to remember it ourself.
+ if (hidden) {
+- hide();
++ QTimer::singleShot(0, this, &QWidget::hide);
+ } else {
+ if (was_maximized_)
+ showMaximized();