feat : take into account that it can be more than just 'mango'

This commit is contained in:
Wateir 2026-04-13 18:55:33 +02:00
parent 11f6f8d63a
commit e35f4939de

View file

@ -549,7 +549,11 @@ int32_t main(int32_t argc, char *argv[]) {
const char *env_XDG_DEKSTOP = getenv("XDG_CURRENT_DESKTOP"); const char *env_XDG_DEKSTOP = getenv("XDG_CURRENT_DESKTOP");
if (!env_XDG_DEKSTOP || strcmp(env_XDG_DEKSTOP, "mango")) { /*
* https://specifications.freedesktop.org/mime-apps/latest/file.html
* can be more than just 'mango' but 'mango,mangowm,wlroots'
*/
if (!env_XDG_DEKSTOP || !strstr(env_XDG_DEKSTOP, "mango")) {
fprintf(stderr, "wrong dekstop, wanted 'mango' have '%s'\n", fprintf(stderr, "wrong dekstop, wanted 'mango' have '%s'\n",
env_XDG_DEKSTOP); env_XDG_DEKSTOP);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);