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 2024-11-28 19:34:40 -05:00 committed by GitHub
parent bbe239647b
commit ee8801b54d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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