gatesgarth migration: weston: Sync with upstream and BSP release rel_imx_5.10.9_1.0.0

Sync with BSP release rel_imx_5.10.9_1.0.0 and remove unnecessary files
after most of them were updated in poky layer.

https://jira.digi.com/browse/DEL-7508

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This commit is contained in:
Arturo Buzarra 2021-04-23 18:55:57 +02:00
parent a7dc3452c6
commit 650bcce1e3
19 changed files with 99 additions and 486 deletions

View File

@ -7,18 +7,6 @@ SRC_URI += " \
file://profile \
"
# To customize weston.ini, start by setting the desired assignment in weston.ini,
# commented out. For example:
# #xwayland=true
# Then add the assignment to INI_UNCOMMENT_ASSIGNMENTS.
INI_UNCOMMENT_ASSIGNMENTS_append_mx8mp = " \
use-g2d=1 \
"
INI_UNCOMMENT_ASSIGNMENTS_append_mx8 = " \
repaint-window=16 \
"
# Digi: use g2d on ccimx6sbc to fix desktop window issue
# Also needed to workaround an HDMI hotplug issue on the ccimx6qpsbc
INI_UNCOMMENT_ASSIGNMENTS_append_ccimx6 = " \

View File

@ -1,30 +0,0 @@
[core]
#gbm-format=argb8888
idle-time=0
#use-g2d=1
#xwayland=true
#repaint-window=16
#enable-overlay-view=1
#[shell]
#size=1920x1080
[libinput]
touchscreen_calibrator=true
#[output]
#name=HDMI-A-1
#mode=1920x1080@60
#transform=rotate-90
#[output]
#name=HDMI-A-2
#mode=off
# WIDTHxHEIGHT Resolution size width and height in pixels
# off Disables the output
# preferred Uses the preferred mode
# current Uses the current crt controller mode
#transform=rotate-90
[screen-share]
command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize

View File

@ -1,131 +0,0 @@
SUMMARY = "Weston, a Wayland compositor"
DESCRIPTION = "Weston is the reference implementation of a Wayland compositor"
HOMEPAGE = "http://wayland.freedesktop.org"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \
file://libweston/compositor.c;endline=27;md5=6c53bbbd99273f4f7c4affa855c33c0a"
SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
file://weston.png \
file://weston.desktop \
file://xwayland.weston-start \
file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \
"
SRC_URI_append_libc-musl = " file://dont-use-plane-add-prop.patch "
SRC_URI[sha256sum] = "5cf5d6ce192e0eb15c1fc861a436bf21b5bb3b91dbdabbdebe83e1f83aa098fe"
UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
inherit meson pkgconfig useradd features_check
# depends on virtual/egl
REQUIRED_DISTRO_FEATURES = "opengl"
DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0"
DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}"
EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false"
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl clients', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \
${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \
launch \
image-jpeg \
screenshare \
shell-desktop \
shell-fullscreen \
shell-ivi"
#
# Compositor choices
#
# Weston on KMS
PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev"
# Weston on Wayland (nested Weston)
PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2"
# Weston on X11
PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo"
# Headless Weston
PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false"
# Weston on framebuffer
PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev"
# weston-launch
PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm"
# VA-API desktop recorder
PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva"
# Weston with EGL support
PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl"
# Weston with lcms support
PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms"
# Weston with webp support
PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp"
# Weston with systemd-login support
PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus"
# Weston with Xwayland support (requires X11 and Wayland)
PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false"
# colord CMS support
PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord"
# Clients support
PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false"
# Virtual remote output with GStreamer on DRM backend
PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer-1.0"
# Weston with PAM support
PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam"
# Weston with screen-share support
PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false"
# Traditional desktop shell
PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false"
# Fullscreen shell
PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false"
# In-Vehicle Infotainment (IVI) shell
PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false"
# JPEG image loading support
PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg"
do_install_append() {
# Weston doesn't need the .la files to load modules, so wipe them
rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la
# If X11, ship a desktop file to launch it
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
install -d ${D}${datadir}/applications
install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
install -d ${D}${datadir}/icons/hicolor/48x48/apps
install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
fi
if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
fi
if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then
chmod u+s ${D}${bindir}/weston-launch
fi
}
PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
libweston-${WESTON_MAJOR_VERSION} ${PN}-examples"
FILES_${PN}-dev += "${libdir}/${BPN}/libexec_weston.so"
FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}"
FILES_libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so"
SUMMARY_libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'."
FILES_${PN}-examples = "${bindir}/*"
FILES_${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so"
RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
RDEPENDS_${PN} += "xkeyboard-config"
RRECOMMENDS_${PN} = "weston-init liberation-fonts"
RRECOMMENDS_${PN}-dev += "wayland-protocols"
USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM_${PN} = "--system weston-launch"

View File

@ -1,9 +1,10 @@
require weston_9.0.0.bb
require recipes-graphics/wayland/weston_9.0.0.bb
SRC_URI_remove = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
SRC_URI_remove = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch"
WESTON_SRC ?= "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https"
SRC_URI_prepend = "${WESTON_SRC};branch=weston-imx-9.0 "
SRCREV = "a1823f20a1d6e24d2f56e98c5576eda34a94f567"
SRCREV = "230e9bc3d647e511e0601e3d45034f22495ed3c7"
S = "${WORKDIR}/git"
# Disable OpenGL for parts with GPU support for 2D but not 3D

View File

@ -0,0 +1,34 @@
SUMMARY = "Qt5 technology demo"
DESCRIPTION = "Cinematic Experience collects many of the new Qt5 QtQuick 2.0 features into the same UX demo application. It uses particles, sprites, path animation, custom shaders etc. features which Qt5 introduces for QML UIs."
HOMEPAGE = "http://quitcoding.com/?page=work#cinex"
LICENSE = "CC-BY-3.0"
LIC_FILES_CHKSUM = "file://README.md;beginline=51;endline=62;md5=894ca59686d0bd2b73d1bca0faf1032f"
SRC_URI = "git://github.com/alpqr/qt5-cinematic-experience.git;protocol=https"
SRCREV = "5d44dd7d4fd563b33570a14c2274e7fa9cc7d84f"
S = "${WORKDIR}/git"
DEPENDS = "qtdeclarative qtgraphicaleffects"
RDEPENDS_${PN} = "liberation-fonts qtdeclarative-qmlplugins qtgraphicaleffects-qmlplugins"
require recipes-qt/qt5/qt5.inc
do_install() {
install -d ${D}${datadir}/${P}
install -m 0755 ${B}/qt5-cinematic-experience ${D}${datadir}/${P}
cp -R --no-dereference --preserve=mode,links ${S}/content ${D}${datadir}/${P}
cp -R --no-dereference --preserve=mode,links ${S}/hlsl ${D}${datadir}/${P}
cp -R --no-dereference --preserve=mode,links ${S}/rhishaders ${D}${datadir}/${P}
install -m 0644 ${S}/main.qml ${D}${datadir}/${P}
install -d ${D}${bindir}
echo "#!/bin/sh" > ${D}${bindir}/qt5-cinematic-experience
echo "export QML_IMPORT_PATH=${datadir}/${P}" >> ${D}${bindir}/qt5-cinematic-experience
echo "export QML2_IMPORT_PATH=${datadir}/${P}" >> ${D}${bindir}/qt5-cinematic-experience
echo "${datadir}/${P}/qt5-cinematic-experience \$* " >> ${D}${bindir}/qt5-cinematic-experience
chmod +x ${D}${bindir}/qt5-cinematic-experience
}
FILES_${PN} += "${datadir}"

View File

@ -8,17 +8,18 @@ LICENSE = "MIT"
inherit packagegroup
RDEPENDS_${PN}_append = " \
qtserialport \
qtbase-examples \
qtdeclarative-examples \
quitindicators \
qt5-demo-extrafiles \
"
# Install the following apps on SoC with GPU
RDEPENDS_${PN}_append_imxgpu = " \
cinematicexperience \
qtbase-examples \
qtconnectivity-examples \
qtdeclarative-examples \
qtmultimedia-examples \
qtsvg-examples \
qt5-demo-extrafiles \
qt5ledscreen \
quitbattery \
qt5everywheredemo \
qt5nmapcarousedemo \
qt5nmapper \
cinematicexperience-rhi \
"

View File

@ -1,3 +1,5 @@
PACKAGECONFIG += "examples"
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

View File

@ -16,7 +16,7 @@ SRC_URI_append_imxgpu3d = " \
'file://0016-Configure-eglfs-with-egl-pkg-config.patch', d)} \
"
PACKAGECONFIG_append = " accessibility examples"
PACKAGECONFIG += "examples"
PACKAGECONFIG_PLATFORM_IMX_GPU = ""
PACKAGECONFIG_PLATFORM_IMX_GPU_mx8 = "eglfs"
@ -28,20 +28,8 @@ PACKAGECONFIG_append_imxgpu = " ${PACKAGECONFIG_MX8_GPU}"
PACKAGECONFIG_append_ccimx6 = " icu"
PACKAGECONFIG_append_ccimx6ul = " linuxfb"
# -eglfs is conditioned on GPU3D with FrameBuffer only
# -no-opengl -linuxfb are conditioned on GPU2D only
# Overwrite the original setting which is in meta-freescale layer
QT_CONFIG_FLAGS_APPEND_imxpxp = "-no-eglfs"
QT_CONFIG_FLAGS_APPEND_imxgpu2d = "-no-eglfs -no-opengl -linuxfb"
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}"
QT_CONFIG_FLAGS_MX8_GPU = ""
QT_CONFIG_FLAGS_MX8_GPU_mx8 = "-eglfs -kms"
QT_CONFIG_FLAGS_append_imxgpu = " ${QT_CONFIG_FLAGS_MX8_GPU}"
PARALLEL_MAKEINST = ""
PARALLEL_MAKE_task-install = "${PARALLEL_MAKEINST}"
do_install_append () {
if ls ${D}${libdir}/pkgconfig/Qt5*.pc >/dev/null 2>&1; then

View File

@ -1,3 +1,8 @@
PACKAGECONFIG_append_class-target = " examples"
PARALLEL_MAKEINST = ""
PARALLEL_MAKE_task-install = "${PARALLEL_MAKEINST}"
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

View File

@ -0,0 +1 @@
PACKAGECONFIG += "examples"

View File

@ -1,31 +0,0 @@
From 90b79bfb3bed86bc560725774a7c7e48375e3389 Mon Sep 17 00:00:00 2001
From: Johan Klokkhammer Helsing <johan.helsing@qt.io>
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 <paul.tvete@qt.io>
---
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

View File

@ -1,59 +0,0 @@
From: Yuqing Zhu <carol.zhu@nxp.com>
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
Upstream-Status: Pending
Signed-off-by: Yuqing Zhu <carol.zhu@nxp.com>
---
tests/auto/client/client/tst_client.cpp | 6 ++++++
1 file changed, 6 insertions(+)
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;
};
+#ifndef QT_NO_OPENGL
class TestGlWindow : public QOpenGLWindow
{
Q_OBJECT
@@ -136,6 +137,7 @@ void TestGlWindow::paintGL()
glClear(GL_COLOR_BUFFER_BIT);
++paintGLCalled;
}
+#endif // QT_NO_OPENGL
class tst_WaylandClient : public QObject
{
@@ -176,7 +178,9 @@ private slots:
void dontCrashOnMultipleCommits();
void hiddenTransientParent();
void hiddenPopupParent();
+#ifndef QT_NO_OPENGL
void glWindow();
+#endif // QT_NO_OPENGL
void longWindowTitle();
void longWindowTitleWithUtf16Characters();
@@ -459,6 +463,7 @@ void tst_WaylandClient::hiddenPopupParen
QTRY_VERIFY(compositor->surface());
}
+#ifndef QT_NO_OPENGL
void tst_WaylandClient::glWindow()
{
QSKIP("Skipping GL tests, as not supported by all CI systems: See https://bugreports.qt.io/browse/QTBUG-65802");
@@ -484,6 +489,7 @@ void tst_WaylandClient::glWindow()
testWindow->setVisible(false);
QTRY_VERIFY(!compositor->surface());
}
+#endif // QT_NO_OPENGL
void tst_WaylandClient::longWindowTitle()
{

View File

@ -1,51 +0,0 @@
From 3d10b7b2de61dbfb64a29f9190962f316f7012f1 Mon Sep 17 00:00:00 2001
From: Johan Klokkhammer Helsing <johan.helsing@qt.io>
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 <paul.tvete@qt.io>
---
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

View File

@ -1,58 +0,0 @@
From 962b9be7992cef672cb6307af5653c97382c334f Mon Sep 17 00:00:00 2001
From: Johan Klokkhammer Helsing <johan.helsing@qt.io>
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 <paul.tvete@qt.io>
---
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<QWaylandWindow *>(QPlatformWindow::parent());
- if (::wl_subsurface *ss = mDisplay->createSubSurface(this, p)) {
- mSubSurfaceWindow = new QWaylandSubSurface(this, p, ss);
+ auto *parent = static_cast<QWaylandWindow *>(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

View File

@ -1,38 +0,0 @@
From 7c0833f4bc22d2d947c793f0711e3f1e1a09012c Mon Sep 17 00:00:00 2001
From: Johan Klokkhammer Helsing <johan.helsing@qt.io>
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 <paul.tvete@qt.io>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
---
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

View File

@ -1,38 +0,0 @@
From 5ed697cda35fe300d2cb828370aaee489a0f9317 Mon Sep 17 00:00:00 2001
From: Paul Olav Tvete <paul.tvete@qt.io>
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 <johan.helsing@qt.io>
---
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

View File

@ -1,13 +1,5 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
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://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 \
"

View File

@ -0,0 +1,31 @@
From d6ad53c37ecab06fbe9c999d6f4aed063552a386 Mon Sep 17 00:00:00 2001
From: Neena Busireddy <neenareddy.busireddy@nxp.com>
Date: Thu, 4 Jun 2020 15:15:15 +0000
Subject: [PATCH] ui_features.gni: Do not enable use_xkbcommon for non
x11/wayland backend [YOCIMX-4648]
xkbcommon is set as default in chromium
https://chromium.googlesource.com/chromium/src.git/+/63d3d7eb06c3518c3be4d97797819d445c8060e4
Disable it for framebuffer as xkcommon is not supported. It is supported only on x11 and wayland.
Signed-off-by: Neena Busireddy <neenareddy.busireddy@nxp.com>
---
chromium/ui/base/ui_features.gni | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chromium/ui/base/ui_features.gni b/chromium/ui/base/ui_features.gni
index ba269ee36c0..8fc462f3c18 100644
--- a/chromium/ui/base/ui_features.gni
+++ b/chromium/ui/base/ui_features.gni
@@ -6,7 +6,7 @@ import("//build/config/ui.gni")
declare_args() {
# Optional system library.
- use_xkbcommon = use_ozone && is_linux && !is_chromecast
+ use_xkbcommon = use_x11 && use_ozone && is_linux && !is_chromecast
# Whether the platform provides a native accessibility toolkit.
has_native_accessibility = use_atk || is_win || is_mac
--
2.25.0

View File

@ -1,9 +1,15 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI_append = " file://0001-ui_features.gni-Do-not-enable-use_xkbcommon-for-non-.patch;patchdir=src/3rdparty"
PACKAGECONFIG += "examples"
PACKAGECONFIG[examples] = ",,qtsvg"
PARALLEL_MAKEINST = ""
PARALLEL_MAKE_task-install = "${PARALLEL_MAKEINST}"
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
}
COMPATIBLE_MACHINE_aarch64 = "(.*)"