public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtwayland/, dev-qt/qtwayland/files/
Date: Fri, 10 Dec 2021 13:19:25 +0000 (UTC)	[thread overview]
Message-ID: <1639142342.7e09ceab8329a85fe65c439afb94d85f68c8d53e.asturm@gentoo> (raw)

commit:     7e09ceab8329a85fe65c439afb94d85f68c8d53e
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 10 12:51:05 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Dec 10 13:19:02 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e09ceab

dev-qt/qtwayland: Try to fix crashes on monitor disconnects

See also: https://codereview.qt-project.org/c/qt/qtwayland/+/381271
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=438839#c53
Package-Manager: Portage-3.0.29, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...-fix-crash-when-iterating-through-outputs.patch | 36 ++++++++++++++++++++++
 dev-qt/qtwayland/qtwayland-5.15.2-r16.ebuild       |  4 +++
 2 files changed, 40 insertions(+)

diff --git a/dev-qt/qtwayland/files/qtwayland-5.15.2-fix-crash-when-iterating-through-outputs.patch b/dev-qt/qtwayland/files/qtwayland-5.15.2-fix-crash-when-iterating-through-outputs.patch
new file mode 100644
index 000000000000..cf37737e0226
--- /dev/null
+++ b/dev-qt/qtwayland/files/qtwayland-5.15.2-fix-crash-when-iterating-through-outputs.patch
@@ -0,0 +1,36 @@
+From 46ed85a80b28d519cf5887bbdce55d1bf57886c3 Mon Sep 17 00:00:00 2001
+From: David Edmundson <davidedmundson@kde.org>
+Date: Sun, 14 Nov 2021 13:54:19 +0000
+Subject: [PATCH] Client: Avoid processing of events when showing windows
+
+The only time we want to dispatch events from the wayland socket is when
+the application is waiting for external events. Doing so at any other
+time will cause unpredictable behavior in client code.
+
+This caused a crash downstream where we had outputs get altered whilst
+itterating through outputs, which shouldn't happen.
+
+There is no benefit to flushing here, it won't make anything appear
+faster as we haven't attached the buffer yet.
+
+Change-Id: Ie13eae4012dab96a93d8810f468d1343402b8c28
+Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
+Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
+---
+ src/client/qwaylandwindow.cpp | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
+index 635c92a08..b0d1c0d1c 100644
+--- a/src/client/qwaylandwindow.cpp
++++ b/src/client/qwaylandwindow.cpp
+@@ -477,7 +477,6 @@ void QWaylandWindow::setVisible(bool visible)
+         if (window()->type() == Qt::Popup || window()->type() == Qt::ToolTip)
+             activePopups << this;
+         initWindow();
+-        mDisplay->flushRequests();
+ 
+         setGeometry(windowGeometry());
+         // Don't flush the events here, or else the newly visible window may start drawing, but since
+-- 
+2.16.3

diff --git a/dev-qt/qtwayland/qtwayland-5.15.2-r16.ebuild b/dev-qt/qtwayland/qtwayland-5.15.2-r16.ebuild
index 528a0d8a1745..60bd8391f0d6 100644
--- a/dev-qt/qtwayland/qtwayland-5.15.2-r16.ebuild
+++ b/dev-qt/qtwayland/qtwayland-5.15.2-r16.ebuild
@@ -33,6 +33,10 @@ BDEPEND="
 	dev-util/wayland-scanner
 "
 
+PATCHES=(
+	"${FILESDIR}"/${P}-fix-crash-when-iterating-through-outputs.patch # KDE-bug 438839
+)
+
 src_configure() {
 	local myqmakeargs=(
 		--


             reply	other threads:[~2021-12-10 13:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-10 13:19 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-06-07 16:16 [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtwayland/, dev-qt/qtwayland/files/ Ionen Wolkens
2025-02-27 11:56 Ionen Wolkens
2025-01-06 22:51 Ionen Wolkens
2024-10-08 17:46 Ionen Wolkens
2024-07-16 17:55 Ionen Wolkens
2023-11-15 19:28 Ionen Wolkens
2023-08-17 23:21 Ionen Wolkens
2023-08-16 16:31 Andreas Sturmlechner
2023-08-08 20:22 Andreas Sturmlechner
2023-06-13 11:42 Andreas Sturmlechner
2023-03-09 15:02 Andreas Sturmlechner
2023-03-08 11:07 Andreas Sturmlechner
2022-04-17 19:29 Sam James
2022-03-21 11:27 Andreas Sturmlechner
2022-03-21 11:04 Andreas Sturmlechner
2022-01-22 12:20 Andreas Sturmlechner
2021-01-07 16:31 Andreas Sturmlechner
2019-12-18 15:41 Andreas Sturmlechner
2019-11-20 21:21 Andreas Sturmlechner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1639142342.7e09ceab8329a85fe65c439afb94d85f68c8d53e.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox