From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D26E2138334 for ; Wed, 20 Nov 2019 21:21:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BED07E0866; Wed, 20 Nov 2019 21:21:27 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 972E1E0866 for ; Wed, 20 Nov 2019 21:21:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3334634D15E for ; Wed, 20 Nov 2019 21:21:26 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7DC048B9 for ; Wed, 20 Nov 2019 21:21:24 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1574284841.3ea3863bbb23502f530f9f22e1053439891053b9.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtwayland/files/, dev-qt/qtwayland/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-qt/qtwayland/files/qtwayland-5.13.2-fix-crash.patch dev-qt/qtwayland/qtwayland-5.13.2-r1.ebuild X-VCS-Directories: dev-qt/qtwayland/files/ dev-qt/qtwayland/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 3ea3863bbb23502f530f9f22e1053439891053b9 X-VCS-Branch: master Date: Wed, 20 Nov 2019 21:21:24 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: ca0f0359-aa30-49fb-95b6-17a31a15267d X-Archives-Hash: 12e4aeab7b397f9a5e7c2d27fc62a94e commit: 3ea3863bbb23502f530f9f22e1053439891053b9 Author: Andreas Sturmlechner gentoo org> AuthorDate: Sat Nov 16 12:32:26 2019 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Wed Nov 20 21:20:41 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ea3863b dev-qt/qtwayland: Fix crash when showing a window with hidden parent Package-Manager: Portage-2.3.79, Repoman-2.3.17 Signed-off-by: Andreas Sturmlechner gentoo.org> .../files/qtwayland-5.13.2-fix-crash.patch | 55 ++++++++++++++++++++++ dev-qt/qtwayland/qtwayland-5.13.2-r1.ebuild | 1 + 2 files changed, 56 insertions(+) diff --git a/dev-qt/qtwayland/files/qtwayland-5.13.2-fix-crash.patch b/dev-qt/qtwayland/files/qtwayland-5.13.2-fix-crash.patch new file mode 100644 index 00000000000..b4e78684bb6 --- /dev/null +++ b/dev-qt/qtwayland/files/qtwayland-5.13.2-fix-crash.patch @@ -0,0 +1,55 @@ +From 962b9be7992cef672cb6307af5653c97382c334f Mon Sep 17 00:00:00 2001 +From: Johan Klokkhammer Helsing +Date: Fri, 1 Nov 2019 11:24:26 +0100 +Subject: [PATCH] Client: Fix crash when showing a child window with a hidden + parent + +[ChangeLog][QPA plugin] Fixed a crash when showing a window with a hidden +parent. + +Now we just avoid creating the subsurface, so nothing is shown. Seems to be +the same behavior as on xcb. + +Fixes: QTBUG-79674 +Change-Id: Ia46fcd9a0da5aad4704816a41515cb1e128ac65f +Reviewed-by: Paul Olav Tvete +--- + src/client/qwaylanddisplay.cpp | 4 ++++ + src/client/qwaylandwindow.cpp | 7 ++++--- + 2 files changed, 8 insertions(+), 3 deletions(-) + +diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp +index 78524f6fc..27e38ccf7 100644 +--- a/src/client/qwaylanddisplay.cpp ++++ b/src/client/qwaylanddisplay.cpp +@@ -109,6 +109,10 @@ struct ::wl_region *QWaylandDisplay::createRegion(const QRegion &qregion) + return nullptr; + } + ++ // Make sure we don't pass NULL surfaces to libwayland (crashes) ++ Q_ASSERT(parent->object()); ++ Q_ASSERT(window->object()); ++ + return mSubCompositor->get_subsurface(window->object(), parent->object()); + } + +diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp +index 8d34afd1f..7098568b4 100644 +--- a/src/client/qwaylandwindow.cpp ++++ b/src/client/qwaylandwindow.cpp +@@ -124,9 +124,10 @@ void QWaylandWindow::initWindow() + if (shouldCreateSubSurface()) { + Q_ASSERT(!mSubSurfaceWindow); + +- QWaylandWindow *p = static_cast(QPlatformWindow::parent()); +- if (::wl_subsurface *ss = mDisplay->createSubSurface(this, p)) { +- mSubSurfaceWindow = new QWaylandSubSurface(this, p, ss); ++ auto *parent = static_cast(QPlatformWindow::parent()); ++ if (parent->object()) { ++ if (::wl_subsurface *subsurface = mDisplay->createSubSurface(this, parent)) ++ mSubSurfaceWindow = new QWaylandSubSurface(this, parent, subsurface); + } + } else if (shouldCreateShellSurface()) { + Q_ASSERT(!mShellSurface); +-- +2.16.3 diff --git a/dev-qt/qtwayland/qtwayland-5.13.2-r1.ebuild b/dev-qt/qtwayland/qtwayland-5.13.2-r1.ebuild index 23b38b6f8d7..7c452ff8e0b 100644 --- a/dev-qt/qtwayland/qtwayland-5.13.2-r1.ebuild +++ b/dev-qt/qtwayland/qtwayland-5.13.2-r1.ebuild @@ -28,6 +28,7 @@ RDEPEND="${DEPEND}" PATCHES=( "${FILESDIR}/${P}-fix-touch-ignored.patch" # QTBUG-79744 + "${FILESDIR}/${P}-fix-crash.patch" # QTBUG-79674 ) src_prepare() {