summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Popov <arrowd@FreeBSD.org>2025-07-25 13:40:42 +0300
committerGleb Popov <arrowd@FreeBSD.org>2025-07-26 21:22:52 +0300
commit4b46b47d31da8d6b6d87bd27903b2d8056a53b22 (patch)
treeaa9de9822fac6ff567bdc658d87396408ec9d918
parentgraphics/qt6-wayland: Add patch to fix crashes of Plasma-on-Wayland when righ... (diff)
x11/plasma6-layer-shell-qt: Fix crash when right-clicking the desktop
Tested by: makc, Kenneth Raplee <kenrap@kennethraplee.com> Pull Request: https://github.com/freebsd/freebsd-ports/pull/431
-rw-r--r--x11/plasma6-layer-shell-qt/Makefile1
-rw-r--r--x11/plasma6-layer-shell-qt/files/patch-src_qwaylandlayersurface.cpp17
2 files changed, 18 insertions, 0 deletions
diff --git a/x11/plasma6-layer-shell-qt/Makefile b/x11/plasma6-layer-shell-qt/Makefile
index 7d07e029f098..30f4a19b164f 100644
--- a/x11/plasma6-layer-shell-qt/Makefile
+++ b/x11/plasma6-layer-shell-qt/Makefile
@@ -1,5 +1,6 @@
PORTNAME= layer-shell-qt
DISTVERSION= ${KDE_PLASMA_VERSION}
+PORTREVISION= 1
CATEGORIES= x11 kde kde-plasma
COMMENT= Qt component to allow applications to make use of the Wayland wl-layer-shell protocol
diff --git a/x11/plasma6-layer-shell-qt/files/patch-src_qwaylandlayersurface.cpp b/x11/plasma6-layer-shell-qt/files/patch-src_qwaylandlayersurface.cpp
new file mode 100644
index 000000000000..264ac398bdcd
--- /dev/null
+++ b/x11/plasma6-layer-shell-qt/files/patch-src_qwaylandlayersurface.cpp
@@ -0,0 +1,17 @@
+Fix the crash that happens when right-clicking the desktop surface
+
+--- src/qwaylandlayersurface.cpp.orig 2025-07-15 09:53:41 UTC
++++ src/qwaylandlayersurface.cpp
+@@ -113,10 +113,8 @@ void QWaylandLayerSurface::attachPopup(QtWaylandClient
+
+ void QWaylandLayerSurface::attachPopup(QtWaylandClient::QWaylandShellSurface *popup)
+ {
+- std::any anyRole = popup->surfaceRole();
+-
+- if (auto role = std::any_cast<::xdg_popup *>(&anyRole)) {
+- get_popup(*role);
++ if (auto role = popup->nativeResource("xdg_popup")) {
++ get_popup(reinterpret_cast<struct ::xdg_popup*>(role));
+ } else {
+ qCWarning(LAYERSHELLQT) << "Cannot attach popup of unknown type";
+ }