diff --git a/src/detection/displayserver/linux/wayland/wayland.c b/src/detection/displayserver/linux/wayland/wayland.c index 181a02b03..9628dcdd7 100644 --- a/src/detection/displayserver/linux/wayland/wayland.c +++ b/src/detection/displayserver/linux/wayland/wayland.c @@ -23,7 +23,6 @@ static void waylandDetectWM(int fd, FFDisplayServerResult* result) FF_STRBUF_AUTO_DESTROY procPath = ffStrbufCreate(); ffStrbufAppendF(&procPath, "/proc/%d/cmdline", ucred.pid); //We check the cmdline for the process name, because it is not trimmed. ffReadFileBuffer(procPath.chars, &result->wmProcessName); - ffStrbufTrimRightSpace(&result->wmProcessName); ffStrbufSubstrBeforeFirstC(&result->wmProcessName, '\0'); //Trim the arguments ffStrbufSubstrAfterLastC(&result->wmProcessName, '/'); //Trim the path } diff --git a/src/detection/displayserver/linux/wmde.c b/src/detection/displayserver/linux/wmde.c index 9fda2f9d7..0319cdd45 100644 --- a/src/detection/displayserver/linux/wmde.c +++ b/src/detection/displayserver/linux/wmde.c @@ -71,11 +71,8 @@ static void applyPrettyNameIfWM(FFDisplayServerResult* result, const char* name) return; if( - ffStrEqualsIgnCase(name, "kwin_wayland") || - ffStrEqualsIgnCase(name, "kwin_wayland_wrapper") || - ffStrEqualsIgnCase(name, "kwin_x11") || - ffStrEqualsIgnCase(name, "kwin_x11_wrapper") || ffStrEqualsIgnCase(name, "kwin") || + ffStrStartsWithIgnCase(name, "kwin_") || ffStrEndsWithIgnCase(name, "-kwin_wayland") || ffStrEndsWithIgnCase(name, "-kwin_x11") ) ffStrbufSetS(&result->wmPrettyName, FF_WM_PRETTY_KWIN);