WM (Linux): fix wl-restart parsing (#1422)

Make the WM name in `wl-restart -n 5 Hyprland` parse as "Hyprland"
instead of "-n".
This commit is contained in:
Ryan authored and GitHub committed 2024-11-29 08:34:40 +08:00
1 parent bbe239647b
commit ee8801b54d
1 file changed
+1 -1
@@ -39,7 +39,7 @@ static bool waylandDetectWM(int fd, FFDisplayServerResult* result)
filename = result->wmProcessName.chars;
if (ffStrEquals(filename, "wl-restart"))
ffStrbufSubstrAfterFirstC(&result->wmProcessName, '\0');
ffStrbufSubstrAfterLastC(&result->wmProcessName, '\0');
ffStrbufSubstrBeforeFirstC(&result->wmProcessName, '\0'); //Trim the arguments
ffStrbufSubstrAfterLastC(&result->wmProcessName, '/'); //Trim the path