2295: Open links in background (fixes #2292) r=edg-l a=def-

Only tested on Linux

Co-authored-by: def <dennis@felsin9.de>
This commit is contained in:
bors[bot] 2020-06-21 09:25:28 +00:00 committed by GitHub
commit 715ef25328
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3254,10 +3254,10 @@ int open_link(const char *link)
str_format(aBuf, sizeof(aBuf), "start %s", link);
return (uintptr_t)ShellExecuteA(NULL, "open", link, NULL, NULL, SW_SHOWDEFAULT) > 32;
#elif defined(CONF_PLATFORM_LINUX)
str_format(aBuf, sizeof(aBuf), "xdg-open %s", link);
str_format(aBuf, sizeof(aBuf), "xdg-open %s &", link);
return system(aBuf) == 0;
#elif defined(CONF_FAMILY_UNIX)
str_format(aBuf, sizeof(aBuf), "open %s", link);
str_format(aBuf, sizeof(aBuf), "open %s &", link);
return system(aBuf) == 0;
#endif
}