diff --git a/meta-digi-dey/recipes-qt/qt5/imx-qtapplications_1.2.2-aarch32.bb b/meta-digi-dey/recipes-qt/qt5/imx-qtapplications_1.2.2-aarch32.bb index 3228c4719..9ee9d3572 100644 --- a/meta-digi-dey/recipes-qt/qt5/imx-qtapplications_1.2.2-aarch32.bb +++ b/meta-digi-dey/recipes-qt/qt5/imx-qtapplications_1.2.2-aarch32.bb @@ -1,5 +1,5 @@ # Copyright (C) 2014-2016 Freescale Semiconductor -# Copyright 2017 NXP +# Copyright 2017-2018 NXP # Released under the MIT license (see COPYING.MIT for the terms) DESCRIPTION = "Freescale QT Multimedia applications" @@ -11,7 +11,7 @@ inherit fsl-eula-unpack pkgconfig # base on QtMultimedia v5.2.1 DEPENDS += "qtmultimedia gstreamer1.0 gstreamer1.0-plugins-base imx-gst1.0-plugin qtquickcontrols" -SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true \ +SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true \ file://qtimxplayer.desktop \ file://qtimxcamera.desktop \ " diff --git a/meta-digi-dey/recipes-qt/qt5/imx-qtapplications_1.2.2-aarch64.bb b/meta-digi-dey/recipes-qt/qt5/imx-qtapplications_1.2.2-aarch64.bb index 1faa85c19..f1180a99f 100644 --- a/meta-digi-dey/recipes-qt/qt5/imx-qtapplications_1.2.2-aarch64.bb +++ b/meta-digi-dey/recipes-qt/qt5/imx-qtapplications_1.2.2-aarch64.bb @@ -1,5 +1,5 @@ # Copyright (C) 2014-2016 Freescale Semiconductor -# Copyright 2017 NXP +# Copyright 2017-2018 NXP # Released under the MIT license (see COPYING.MIT for the terms) DESCRIPTION = "Freescale QT Multimedia applications" @@ -11,8 +11,7 @@ inherit fsl-eula-unpack pkgconfig # base on QtMultimedia v5.2.1 DEPENDS += "qtmultimedia gstreamer1.0 gstreamer1.0-plugins-base imx-gst1.0-plugin qtquickcontrols" -SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true \ -" +SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true" SRC_URI[md5sum] = "3f17dca2b5668b97dda46eff8719e53f" SRC_URI[sha256sum] = "a9c5511668b7f37d3d8a610da99952d78e044147fad9fc1b4e88aaa80ebc01b9" diff --git a/meta-digi-dey/recipes-qt/qt5/qt5-demo-extrafiles.bbappend b/meta-digi-dey/recipes-qt/qt5/qt5-demo-extrafiles.bbappend new file mode 100644 index 000000000..f9926e905 --- /dev/null +++ b/meta-digi-dey/recipes-qt/qt5/qt5-demo-extrafiles.bbappend @@ -0,0 +1,32 @@ +# Install hellowindow demo as a default QT APP on all platforms +do_install () { + install -d ${D}/${datadir}/pixmaps + install -d ${D}/${datadir}/applications + install -m 0644 ${WORKDIR}/hellowindow.png ${D}/${datadir}/pixmaps + install -m 0644 ${WORKDIR}/hellowindow.desktop ${D}/${datadir}/applications +} + +# Install other qt5 demos on SoC with GPU +# Align with former release, do not install +# hellogl_es2.desktop & qt5basket.desktop & qt5nesting.desktop & qt5solarsystem.desktop +# as they are not supported + +do_install_append_imxgpu2d () { + install -m 0644 ${WORKDIR}/cinematicexperience.png ${D}/${datadir}/pixmaps + install -m 0644 ${WORKDIR}/cinematicexperience.desktop ${D}/${datadir}/applications + install -m 0644 ${WORKDIR}/qt5everywheredemo.png ${D}/${datadir}/pixmaps + install -m 0644 ${WORKDIR}/qt5everywheredemo.desktop ${D}/${datadir}/applications + install -m 0644 ${WORKDIR}/qt5nmapcarousedemo.png ${D}/${datadir}/pixmaps + install -m 0644 ${WORKDIR}/qt5nmapcarousedemo.desktop ${D}/${datadir}/applications + install -m 0644 ${WORKDIR}/qt5nmapper.png ${D}/${datadir}/pixmaps + install -m 0644 ${WORKDIR}/qt5nmapper.desktop ${D}/${datadir}/applications + install -m 0644 ${WORKDIR}/qtledbillboard.png ${D}/${datadir}/pixmaps + install -m 0644 ${WORKDIR}/qtledbillboard.desktop ${D}/${datadir}/applications + install -m 0644 ${WORKDIR}/qtledcombo.png ${D}/${datadir}/pixmaps + install -m 0644 ${WORKDIR}/qtledcombo.desktop ${D}/${datadir}/applications + install -m 0644 ${WORKDIR}/quitbattery.png ${D}/${datadir}/pixmaps + install -m 0644 ${WORKDIR}/quitbattery.desktop ${D}/${datadir}/applications + install -m 0644 ${WORKDIR}/quitindicators.png ${D}/${datadir}/pixmaps + install -m 0644 ${WORKDIR}/quitindicators.desktop ${D}/${datadir}/applications +} + diff --git a/meta-digi-dey/recipes-qt/qt5/qtbase/0016-Configure-eglfs-with-egl-pkg-config.patch b/meta-digi-dey/recipes-qt/qt5/qtbase/0016-Configure-eglfs-with-egl-pkg-config.patch new file mode 100644 index 000000000..a245d79aa --- /dev/null +++ b/meta-digi-dey/recipes-qt/qt5/qtbase/0016-Configure-eglfs-with-egl-pkg-config.patch @@ -0,0 +1,13 @@ +Index: git/src/plugins/platforms/eglfs/eglfs-plugin.pro +=================================================================== +--- git.orig/src/plugins/platforms/eglfs/eglfs-plugin.pro 2017-01-04 16:54:05.000000000 -0600 ++++ git/src/plugins/platforms/eglfs/eglfs-plugin.pro 2017-01-04 16:56:25.000000000 -0600 +@@ -2,6 +2,8 @@ + + QT += platformsupport-private eglfs_device_lib-private + ++CONFIG += egl ++ + SOURCES += $$PWD/qeglfsmain.cpp + + OTHER_FILES += $$PWD/eglfs.json diff --git a/meta-digi-dey/recipes-qt/qt5/qtbase_%.bbappend b/meta-digi-dey/recipes-qt/qt5/qtbase_%.bbappend index 3e243fdf1..0613b8b63 100644 --- a/meta-digi-dey/recipes-qt/qt5/qtbase_%.bbappend +++ b/meta-digi-dey/recipes-qt/qt5/qtbase_%.bbappend @@ -6,8 +6,14 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -SRC_URI_append = " file://qt5.sh" +IMX_BACKEND = \ + "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland',\ + bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', \ + 'fb', d), d)}" +SRC_URI_append = " \ + file://qt5-${IMX_BACKEND}.sh \ +" # Technically, we should add the following patches to imxgpu platforms, but # doing so duplicates them for imxgpu2d platforms and causes build errors. # As of now, the only SoC that is imxgpu and not imxgpu2d is the i.MX8MN, so @@ -16,13 +22,21 @@ SRC_URI_append_mx8mn = " \ file://0014-Add-IMX-GPU-support.patch \ file://0001-egl.prf-Fix-build-error-when-egl-headers-need-platfo.patch \ " - -SRC_URI_remove_imxgpu3d = "file://0016-Configure-eglfs-with-egl-pkg-config.patch" +SRC_URI_append_imxgpu3d = " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', \ + '', \ + 'file://0016-Configure-eglfs-with-egl-pkg-config.patch', d)} \ +" PACKAGECONFIG_GL_imxpxp = "gles2" PACKAGECONFIG_GL_imxgpu2d = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gl', '', d)}" PACKAGECONFIG_GL_imxgpu3d = "gles2" -PACKAGECONFIG_append = " accessibility examples fontconfig sql-sqlite" +PACKAGECONFIG_append = " accessibility examples" + +PACKAGECONFIG_MX8_GPU = "" +PACKAGECONFIG_MX8_GPU_mx8 = " gbm kms" +PACKAGECONFIG_append_imxgpu = " ${PACKAGECONFIG_MX8_GPU}" + PACKAGECONFIG_append_ccimx6 = " icu" PACKAGECONFIG_append_ccimx6ul = " linuxfb" @@ -35,17 +49,18 @@ QT_CONFIG_FLAGS_APPEND_imxgpu3d = "\ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '-no-eglfs', \ bb.utils.contains('DISTRO_FEATURES', 'wayland', '-no-eglfs', \ '-eglfs', d), d)}" -QT_CONFIG_FLAGS_append = " ${QT_CONFIG_FLAGS_APPEND} -optimize-size" +QT_CONFIG_FLAGS_append = " ${QT_CONFIG_FLAGS_APPEND}" -PACKAGECONFIG_WAYLAND ?= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'xkbcommon-evdev', '', d)}" -PACKAGECONFIG += "${PACKAGECONFIG_WAYLAND}" +QT_CONFIG_FLAGS_MX8_GPU = "" +QT_CONFIG_FLAGS_MX8_GPU_mx8 = "-eglfs -kms" +QT_CONFIG_FLAGS_append_imxgpu = " ${QT_CONFIG_FLAGS_MX8_GPU}" -do_install_append() { - if ls ${D}${libdir}/pkgconfig/Qt5*.pc >/dev/null 2>&1; then - sed -i 's,-L${STAGING_DIR_HOST}/usr/lib,,' ${D}${libdir}/pkgconfig/Qt5*.pc - fi - install -d ${D}${sysconfdir}/profile.d/ - install -m 0755 ${WORKDIR}/qt5.sh ${D}${sysconfdir}/profile.d/qt5.sh +do_install_append () { + if ls ${D}${libdir}/pkgconfig/Qt5*.pc >/dev/null 2>&1; then + sed -i 's,-L${STAGING_DIR_HOST}/usr/lib,,' ${D}${libdir}/pkgconfig/Qt5*.pc + fi + install -d ${D}${sysconfdir}/profile.d/ + install -m 0755 ${WORKDIR}/qt5-${IMX_BACKEND}.sh ${D}${sysconfdir}/profile.d/qt5.sh } FILES_${PN} += "${sysconfdir}/profile.d/qt5.sh" diff --git a/meta-digi-dey/recipes-qt/qt5/qtwayland/0001-Compositor-Fix-access-to-member-of-null-reference.patch b/meta-digi-dey/recipes-qt/qt5/qtwayland/0001-Compositor-Fix-access-to-member-of-null-reference.patch new file mode 100644 index 000000000..26d0f6262 --- /dev/null +++ b/meta-digi-dey/recipes-qt/qt5/qtwayland/0001-Compositor-Fix-access-to-member-of-null-reference.patch @@ -0,0 +1,31 @@ +From 90b79bfb3bed86bc560725774a7c7e48375e3389 Mon Sep 17 00:00:00 2001 +From: Johan Klokkhammer Helsing +Date: Mon, 21 Oct 2019 13:14:58 +0200 +Subject: [PATCH] Compositor: Fix access to member of null reference + +This could happen if there were no seats. + +Upstream-Status: Backport from dev branch/v5.14.0 + +Change-Id: I4c88a5768289e2ac8a736efaa14e37d499de01c9 +Reviewed-by: Paul Olav Tvete +--- + src/imports/compositor/WaylandCursorItem.qml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/imports/compositor/WaylandCursorItem.qml b/src/imports/compositor/WaylandCursorItem.qml +index 1fa09967..e50c82d5 100644 +--- a/src/imports/compositor/WaylandCursorItem.qml ++++ b/src/imports/compositor/WaylandCursorItem.qml +@@ -73,7 +73,7 @@ WaylandQuickItem { + x: cursorItem.hotspotX + offset.x + y: cursorItem.hotspotY + offset.y + z: -1 +- surface: cursorItem.seat.drag.icon ++ surface: cursorItem.seat ? cursorItem.seat.drag.icon : null + + Connections { + target: dragIcon.surface +-- +2.17.1 + diff --git a/meta-digi-dey/recipes-qt/qt5/qtwayland/0001-Fix-crash-when-wl_surface-was-destroyed-before-eglDe.patch b/meta-digi-dey/recipes-qt/qt5/qtwayland/0001-Fix-crash-when-wl_surface-was-destroyed-before-eglDe.patch deleted file mode 100644 index 6365f04fa..000000000 --- a/meta-digi-dey/recipes-qt/qt5/qtwayland/0001-Fix-crash-when-wl_surface-was-destroyed-before-eglDe.patch +++ /dev/null @@ -1,31 +0,0 @@ -From f407bd40a35153f88b3492814b805e0773e53881 Mon Sep 17 00:00:00 2001 -From: Alexandru Palalau -Date: Mon, 15 Jan 2018 15:18:41 +0200 -Subject: [PATCH] =?UTF-8?q?Fix=20crash=20when=20wl=5Fsurface=20was=20destr?= - =?UTF-8?q?oyed=20before=20eglDestroySurface=20called.=20Upstream=C2=A0Sta?= - =?UTF-8?q?tus:=C2=A0Inappropriate=C2=A0[i.MX=C2=A0specific]?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Alexandru Palalau ---- - src/client/qwaylandwindow.cpp | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp -index 6d7c088..94c89a3 100644 ---- a/src/client/qwaylandwindow.cpp -+++ b/src/client/qwaylandwindow.cpp -@@ -385,8 +385,6 @@ void QWaylandWindow::setVisible(bool visible) - QWindowSystemInterface::flushWindowSystemEvents(); - if (!deleteGuard.isNull() && window()->type() == Qt::Popup) - closePopups(this); -- if (!deleteGuard.isNull()) -- reset(); - } - } - --- -2.7.4 - diff --git a/meta-digi-dey/recipes-qt/qt5/qtwayland/0001-hardwareintegration-Do-not-include-shm-emulation-ser.patch b/meta-digi-dey/recipes-qt/qt5/qtwayland/0001-hardwareintegration-Do-not-include-shm-emulation-ser.patch index b60ec0b0c..66eb765df 100644 --- a/meta-digi-dey/recipes-qt/qt5/qtwayland/0001-hardwareintegration-Do-not-include-shm-emulation-ser.patch +++ b/meta-digi-dey/recipes-qt/qt5/qtwayland/0001-hardwareintegration-Do-not-include-shm-emulation-ser.patch @@ -17,7 +17,7 @@ Signed-off-by: Neena Busireddy 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/hardwareintegration/client/client.pro b/src/plugins/hardwareintegration/client/client.pro -index f1c71f0..5bf9e12 100644 +index f1c71f0..b90610d 100644 --- a/src/plugins/hardwareintegration/client/client.pro +++ b/src/plugins/hardwareintegration/client/client.pro @@ -15,4 +15,4 @@ qtConfig(libhybris-egl-server): \ @@ -25,17 +25,19 @@ index f1c71f0..5bf9e12 100644 ### TODO: make shm-emulation configurable -SUBDIRS += shm-emulation-server -+# SUBDIRS += shm-emulation-server ++#SUBDIRS += shm-emulation-server diff --git a/src/plugins/hardwareintegration/compositor/compositor.pro b/src/plugins/hardwareintegration/compositor/compositor.pro -index 0b2a429..f50561a 100644 +index 22301d0..45b7e0e 100644 --- a/src/plugins/hardwareintegration/compositor/compositor.pro +++ b/src/plugins/hardwareintegration/compositor/compositor.pro -@@ -15,4 +15,4 @@ qtConfig(libhybris-egl-server): \ +@@ -15,6 +15,6 @@ qtConfig(libhybris-egl-server): \ SUBDIRS += libhybris-egl-server ### TODO: make shm-emulation configurable -SUBDIRS += shm-emulation-server -+# SUBDIRS += shm-emulation-server ++#SUBDIRS += shm-emulation-server + + SUBDIRS += hardwarelayer -- 1.9.1 diff --git a/meta-digi-dey/recipes-qt/qt5/qtwayland/0001-tst_client.cpp-Fix-no-opengl-build.patch b/meta-digi-dey/recipes-qt/qt5/qtwayland/0001-tst_client.cpp-Fix-no-opengl-build.patch index e84981ec3..fe9a4a4fb 100644 --- a/meta-digi-dey/recipes-qt/qt5/qtwayland/0001-tst_client.cpp-Fix-no-opengl-build.patch +++ b/meta-digi-dey/recipes-qt/qt5/qtwayland/0001-tst_client.cpp-Fix-no-opengl-build.patch @@ -1,6 +1,5 @@ -From 9e2f959060d8767f8710e113621c0004f21ace93 Mon Sep 17 00:00:00 2001 From: Yuqing Zhu -Date: Fri, 11 May 2018 13:51:55 +0800 +Date: Tue, 8 Jan 2019 17:51:59 +0800 Subject: [PATCH] tst_client.cpp: Fix no-opengl build error The error is introduced by bf09c7a1493c01a65ee0f110b37a04e653edc08e @@ -8,15 +7,14 @@ The error is introduced by bf09c7a1493c01a65ee0f110b37a04e653edc08e Upstream-Status: Pending Signed-off-by: Yuqing Zhu -Signed-off-by: Arturo Buzarra --- tests/auto/client/client/tst_client.cpp | 6 ++++++ 1 file changed, 6 insertions(+) -diff --git a/tests/auto/client/client/tst_client.cpp b/tests/auto/client/client/tst_client.cpp -index 874de82c..af414d4f 100644 ---- a/tests/auto/client/client/tst_client.cpp -+++ b/tests/auto/client/client/tst_client.cpp +Index: git/tests/auto/client/client/tst_client.cpp +=================================================================== +--- git.orig/tests/auto/client/client/tst_client.cpp ++++ git/tests/auto/client/client/tst_client.cpp @@ -107,6 +107,7 @@ public: QPoint mousePressPos; }; @@ -33,18 +31,17 @@ index 874de82c..af414d4f 100644 class tst_WaylandClient : public QObject { -@@ -180,8 +182,10 @@ private slots: +@@ -176,7 +178,9 @@ private slots: void dontCrashOnMultipleCommits(); void hiddenTransientParent(); void hiddenPopupParent(); -+#ifndef QT_NO_OPENGL ++#ifndef QT_NO_OPENGL void glWindow(); - void longWindowTitle(); +#endif // QT_NO_OPENGL + void longWindowTitle(); + void longWindowTitleWithUtf16Characters(); - private: - MockCompositor *compositor = nullptr; -@@ -558,6 +562,7 @@ void tst_WaylandClient::hiddenPopupParent() +@@ -459,6 +463,7 @@ void tst_WaylandClient::hiddenPopupParen QTRY_VERIFY(compositor->surface()); } @@ -52,7 +49,7 @@ index 874de82c..af414d4f 100644 void tst_WaylandClient::glWindow() { QSKIP("Skipping GL tests, as not supported by all CI systems: See https://bugreports.qt.io/browse/QTBUG-65802"); -@@ -583,6 +588,7 @@ void tst_WaylandClient::glWindow() +@@ -484,6 +489,7 @@ void tst_WaylandClient::glWindow() testWindow->setVisible(false); QTRY_VERIFY(!compositor->surface()); } @@ -60,6 +57,3 @@ index 874de82c..af414d4f 100644 void tst_WaylandClient::longWindowTitle() { --- -2.20.1 - diff --git a/meta-digi-dey/recipes-qt/qt5/qtwayland/0002-Compositor-Fix-crashes-when-destroying-uninitialized.patch b/meta-digi-dey/recipes-qt/qt5/qtwayland/0002-Compositor-Fix-crashes-when-destroying-uninitialized.patch new file mode 100644 index 000000000..685a59db3 --- /dev/null +++ b/meta-digi-dey/recipes-qt/qt5/qtwayland/0002-Compositor-Fix-crashes-when-destroying-uninitialized.patch @@ -0,0 +1,51 @@ +From 3d10b7b2de61dbfb64a29f9190962f316f7012f1 Mon Sep 17 00:00:00 2001 +From: Johan Klokkhammer Helsing +Date: Mon, 21 Oct 2019 13:13:00 +0200 +Subject: [PATCH] Compositor: Fix crashes when destroying uninitialized + surfaces + +This happened when running qmlplugindump for QtWayland. + +[ChangeLog][Compositor] Fixed a crash when destroying WaylandSurfaces and +WlShellSurfaces which had not yet been initialized. + +Upstream-Status: Backport from dev branch/v5.14.0 + +Change-Id: Ia35cc1ccddc6146453d4dbba0ffd41a012a526e3 +Reviewed-by: Paul Olav Tvete +--- + src/compositor/compositor_api/qwaylandsurface.cpp | 3 ++- + src/compositor/extensions/qwaylandwlshell.cpp | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/compositor/compositor_api/qwaylandsurface.cpp b/src/compositor/compositor_api/qwaylandsurface.cpp +index a82c93f7..8c866351 100644 +--- a/src/compositor/compositor_api/qwaylandsurface.cpp ++++ b/src/compositor/compositor_api/qwaylandsurface.cpp +@@ -391,7 +391,8 @@ QWaylandSurface::QWaylandSurface(QWaylandSurfacePrivate &dptr) + QWaylandSurface::~QWaylandSurface() + { + Q_D(QWaylandSurface); +- QWaylandCompositorPrivate::get(d->compositor)->unregisterSurface(this); ++ if (d->compositor) ++ QWaylandCompositorPrivate::get(d->compositor)->unregisterSurface(this); + d->notifyViewsAboutDestruction(); + } + +diff --git a/src/compositor/extensions/qwaylandwlshell.cpp b/src/compositor/extensions/qwaylandwlshell.cpp +index 66aeb64b..92423488 100644 +--- a/src/compositor/extensions/qwaylandwlshell.cpp ++++ b/src/compositor/extensions/qwaylandwlshell.cpp +@@ -466,7 +466,8 @@ QWaylandWlShellSurface::QWaylandWlShellSurface(QWaylandWlShell *shell, QWaylandS + QWaylandWlShellSurface::~QWaylandWlShellSurface() + { + Q_D(QWaylandWlShellSurface); +- QWaylandWlShellPrivate::get(d->m_shell)->unregisterShellSurface(this); ++ if (d->m_shell) ++ QWaylandWlShellPrivate::get(d->m_shell)->unregisterShellSurface(this); + } + + /*! +-- +2.17.1 + diff --git a/meta-digi-dey/recipes-qt/qt5/qtwayland/0003-Client-Fix-crash-when-showing-a-child-window-with-a-.patch b/meta-digi-dey/recipes-qt/qt5/qtwayland/0003-Client-Fix-crash-when-showing-a-child-window-with-a-.patch new file mode 100644 index 000000000..fd4dc76ac --- /dev/null +++ b/meta-digi-dey/recipes-qt/qt5/qtwayland/0003-Client-Fix-crash-when-showing-a-child-window-with-a-.patch @@ -0,0 +1,58 @@ +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. + +Upstream-Status: Backport from dev branch/v5.14.0 + +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 78524f6f..27e38ccf 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 8d34afd1..7098568b 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.17.1 + diff --git a/meta-digi-dey/recipes-qt/qt5/qtwayland/0004-Client-really-use-OpenGL-ES-2-API-for-decoration-bli.patch b/meta-digi-dey/recipes-qt/qt5/qtwayland/0004-Client-really-use-OpenGL-ES-2-API-for-decoration-bli.patch new file mode 100644 index 000000000..ef80b7468 --- /dev/null +++ b/meta-digi-dey/recipes-qt/qt5/qtwayland/0004-Client-really-use-OpenGL-ES-2-API-for-decoration-bli.patch @@ -0,0 +1,34 @@ +From 6e9d6f166dec65e91b4dbf73ccb60170e0a56dc8 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Tue, 26 Nov 2019 09:39:25 +0100 +Subject: [PATCH] Client: really use OpenGL ES 2 API for decoration blitter + +Really use (as the comment states) the OpenGL ES 2 API for +the decoration blitter. + +Upstream-Status: Backport from dev branch + +Task-number: QTBUG-80356 +Change-Id: I4c923343e721a824521fb9b2b36be5d2de984325 +Reviewed-by: Pier Luigi Fiorini +Reviewed-by: Johan Helsing +--- + .../client/wayland-egl/qwaylandglcontext.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp +index 5bd2760d..7679a5fb 100644 +--- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp ++++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp +@@ -312,7 +312,7 @@ QWaylandGLContext::QWaylandGLContext(EGLDisplay eglDisplay, QWaylandDisplay *dis + + // Create an EGL context for the decorations blitter. By using a dedicated context we don't need to make sure to not + // change the context state and we also use OpenGL ES 2 API independently to what the app is using to draw. +- QVector eglDecorationsContextAttrs = { EGL_CONTEXT_CLIENT_VERSION, 1, EGL_NONE }; ++ QVector eglDecorationsContextAttrs = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE }; + m_decorationsContext = eglCreateContext(m_eglDisplay, m_config, m_context, eglDecorationsContextAttrs.constData()); + if (m_decorationsContext == EGL_NO_CONTEXT) + qWarning("QWaylandGLContext: Failed to create the decorations EGLContext. Decorations will not be drawn."); +-- +2.17.1 + diff --git a/meta-digi-dey/recipes-qt/qt5/qtwayland/0005-Client-Always-close-popups-when-hiding-a-window.patch b/meta-digi-dey/recipes-qt/qt5/qtwayland/0005-Client-Always-close-popups-when-hiding-a-window.patch new file mode 100644 index 000000000..af2f3bc5d --- /dev/null +++ b/meta-digi-dey/recipes-qt/qt5/qtwayland/0005-Client-Always-close-popups-when-hiding-a-window.patch @@ -0,0 +1,38 @@ +From 7c0833f4bc22d2d947c793f0711e3f1e1a09012c Mon Sep 17 00:00:00 2001 +From: Johan Klokkhammer Helsing +Date: Thu, 5 Dec 2019 12:24:07 +0100 +Subject: [PATCH] Client: Always close popups when hiding a window + +It's not just popups that may have popups open on them. Always close open +popups when hiding a window to prevent dangling pointers. + +[ChangeLog][QPA plugin] Fixed a crash when re-showing a popup after hiding its +parent. + +Upstream-Status: Backport from dev branch + +Fixes: QTBUG-80562 +Change-Id: I7cdac5c7a30e0add5ebf00259401e4d74626ce96 +Reviewed-by: Paul Olav Tvete +Reviewed-by: David Edmundson +--- + src/client/qwaylandwindow.cpp | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp +index 950486c0..0df99d9f 100644 +--- a/src/client/qwaylandwindow.cpp ++++ b/src/client/qwaylandwindow.cpp +@@ -426,8 +426,7 @@ void QWaylandWindow::setVisible(bool visible) + // QWaylandShmBackingStore::beginPaint(). + } else { + sendExposeEvent(QRect()); +- if (window()->type() == Qt::Popup) +- closePopups(this); ++ closePopups(this); + reset(); + } + } +-- +2.17.1 + diff --git a/meta-digi-dey/recipes-qt/qt5/qtwayland/0006-Avoid-potential-double-deletion.patch b/meta-digi-dey/recipes-qt/qt5/qtwayland/0006-Avoid-potential-double-deletion.patch new file mode 100644 index 000000000..f05c08eb7 --- /dev/null +++ b/meta-digi-dey/recipes-qt/qt5/qtwayland/0006-Avoid-potential-double-deletion.patch @@ -0,0 +1,38 @@ +From 5ed697cda35fe300d2cb828370aaee489a0f9317 Mon Sep 17 00:00:00 2001 +From: Paul Olav Tvete +Date: Thu, 9 Jan 2020 10:28:57 +0100 +Subject: [PATCH] Avoid potential double deletion + +It's not safe to use qDeleteAll on lists that change when elements are +deleted. + +Upstream-Status: Backport from dev branch + +Change-Id: I7ec5b41da9eea839d1bda88bde621cc73a27927f +Reviewed-by: Johan Helsing +--- + src/compositor/compositor_api/qwaylandcompositor.cpp | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/compositor/compositor_api/qwaylandcompositor.cpp b/src/compositor/compositor_api/qwaylandcompositor.cpp +index 5b77a3be..e021b742 100644 +--- a/src/compositor/compositor_api/qwaylandcompositor.cpp ++++ b/src/compositor/compositor_api/qwaylandcompositor.cpp +@@ -236,9 +236,12 @@ void QWaylandCompositorPrivate::init() + + QWaylandCompositorPrivate::~QWaylandCompositorPrivate() + { +- qDeleteAll(clients); ++ // Take copies, since the lists will get modified as elements are deleted ++ const auto clientsToDelete = clients; ++ qDeleteAll(clientsToDelete); + +- qDeleteAll(outputs); ++ const auto outputsToDelete = outputs; ++ qDeleteAll(outputsToDelete); + + #if QT_CONFIG(wayland_datadevice) + delete data_device_manager; +-- +2.17.1 + diff --git a/meta-digi-dey/recipes-qt/qt5/qtwayland_%.bbappend b/meta-digi-dey/recipes-qt/qt5/qtwayland_%.bbappend index bedbae95e..5ca0b9f96 100644 --- a/meta-digi-dey/recipes-qt/qt5/qtwayland_%.bbappend +++ b/meta-digi-dey/recipes-qt/qt5/qtwayland_%.bbappend @@ -1,9 +1,17 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -SRC_URI_append = " file://0001-Fix-crash-when-wl_surface-was-destroyed-before-eglDe.patch \ - file://0001-tst_client.cpp-Fix-no-opengl-build.patch \ + +SRC_URI_append = " \ + file://0001-tst_client.cpp-Fix-no-opengl-build.patch \ + file://0001-Compositor-Fix-access-to-member-of-null-reference.patch \ + file://0002-Compositor-Fix-crashes-when-destroying-uninitialized.patch \ + file://0003-Client-Fix-crash-when-showing-a-child-window-with-a-.patch \ + file://0004-Client-really-use-OpenGL-ES-2-API-for-decoration-bli.patch \ + file://0005-Client-Always-close-popups-when-hiding-a-window.patch \ + file://0006-Avoid-potential-double-deletion.patch \ " SRC_URI_append_mx6sl = " file://0001-hardwareintegration-Do-not-include-shm-emulation-ser.patch \ " + PACKAGECONFIG_remove_mx6 = "xcomposite-egl xcomposite-glx" PACKAGECONFIG_remove_mx6sl = "wayland-egl" PACKAGECONFIG_remove_mx7 = "xcomposite-egl xcomposite-glx"