aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2021-11-02 15:32:37 +0000
committerJan Beich <jbeich@FreeBSD.org>2021-11-08 17:33:08 +0000
commit03033c16bb99787ae83ea1a938550adfc1a6660a (patch)
treeb8d7a9d45ef50c3103bf7107573c1e2f1dc93199
parent6a7fc8ddc236995f91d6eb7c5d29b7f6b9a601b5 (diff)
downloadports-03033c16bb99787ae83ea1a938550adfc1a6660a.tar.gz
ports-03033c16bb99787ae83ea1a938550adfc1a6660a.zip
x11-wm/plasma5-kwin: unbreak Xwayland support after 4ea20bee5063
kwin_xwl: Failed to find free X11 connection socket PR: 259614 Approved by: tcberner
-rw-r--r--x11-wm/plasma5-kwin/Makefile1
-rw-r--r--x11-wm/plasma5-kwin/files/patch-src_xwl_lib_xwaylandsocket.cpp35
2 files changed, 36 insertions, 0 deletions
diff --git a/x11-wm/plasma5-kwin/Makefile b/x11-wm/plasma5-kwin/Makefile
index 0a9def8ca3e0..706dac5a37cc 100644
--- a/x11-wm/plasma5-kwin/Makefile
+++ b/x11-wm/plasma5-kwin/Makefile
@@ -1,5 +1,6 @@
PORTNAME= kwin
DISTVERSION= ${KDE_PLASMA_VERSION}
+PORTREVISION= 1
CATEGORIES= x11-wm kde kde-plasma
MAINTAINER= kde@FreeBSD.org
diff --git a/x11-wm/plasma5-kwin/files/patch-src_xwl_lib_xwaylandsocket.cpp b/x11-wm/plasma5-kwin/files/patch-src_xwl_lib_xwaylandsocket.cpp
new file mode 100644
index 000000000000..8dcb2c966e48
--- /dev/null
+++ b/x11-wm/plasma5-kwin/files/patch-src_xwl_lib_xwaylandsocket.cpp
@@ -0,0 +1,35 @@
+$ kwin_wayland --xwayland
+[...]
+kwin_xwl: Failed to find free X11 connection socket
+Failed to establish X11 socket
+
+--- src/xwl/lib/xwaylandsocket.cpp.orig 2021-10-26 12:27:37 UTC
++++ src/xwl/lib/xwaylandsocket.cpp
+@@ -183,10 +183,17 @@ XwaylandSocket::XwaylandSocket(OperationMode mode)
+ continue;
+ }
+
++#if defined(Q_OS_LINUX)
+ const int abstractFileDescriptor = listen_helper(socketFilePath, UnixSocketAddress::Type::Abstract, mode);
++#else
++ const int abstractFileDescriptor = listen_helper(socketFilePath + "_", UnixSocketAddress::Type::Unix, mode);
++#endif
+ if (abstractFileDescriptor == -1) {
+ QFile::remove(lockFilePath);
+ QFile::remove(socketFilePath);
++#if !defined(Q_OS_LINUX)
++ QFile::remove(socketFilePath + "_");
++#endif
+ close(unixFileDescriptor);
+ continue;
+ }
+@@ -212,6 +219,9 @@ XwaylandSocket::~XwaylandSocket()
+ }
+ if (!m_socketFilePath.isEmpty()) {
+ QFile::remove(m_socketFilePath);
++#if !defined(Q_OS_LINUX)
++ QFile::remove(m_socketFilePath + "_");
++#endif
+ }
+ if (!m_lockFilePath.isEmpty()) {
+ QFile::remove(m_lockFilePath);