From 59e61f53e125e17634e4bb00a068f79d054a618a Mon Sep 17 00:00:00 2001 From: Linus Dierheimer Date: Wed, 5 Jan 2022 15:02:54 +0100 Subject: [PATCH] XCB: set wm protocol if connection succeded --- src/detection/displayserver/xcb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/detection/displayserver/xcb.c b/src/detection/displayserver/xcb.c index de9fd1d90..8b571b6a6 100644 --- a/src/detection/displayserver/xcb.c +++ b/src/detection/displayserver/xcb.c @@ -124,6 +124,10 @@ void ffdsConnectXcb(const FFinstance* instance, FFDisplayServerResult* result) ffxcb_disconnect(connection); dlclose(xcb); + + //If wayland hasn't set this, connection failed for it. So we are running only a X Server, not XWayland. + if(result->wmProtocolName.length == 0) + ffStrbufSetS(&result->wmProtocolName, FF_DISPLAYSERVER_PROTOCOL_X11); } #else