aboutsummaryrefslogtreecommitdiff
path: root/x11-wm/plasma5-kwin/files/patch-src_xwl_lib_xwaylandsocket.cpp
blob: 8dcb2c966e485f71046ee5657f0d9c0d8ed7aa00 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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);