feat(linux/portal): Support multiple XDG Portal session implementations (#5856)

Co-authored-by: Dave Lane <42013603+ReenigneArcher@users.noreply.github.com>
This commit is contained in:
Conn O'GriofaandDave Lane authored and GitHub committed 2026-10-10 19:44:41 -04:00
1 parent 22ab9b2fac
commit 6aec9753b3
10 files changed
+371 -9

No files matched your search

+13
View File
@@ -369,6 +369,19 @@ namespace platf {
return config_path;
}
/**
* @brief Get path of the XDG Portal restore token.
*
* @return Path of token that may include the session desktop as a suffix (e.g. .gnome, .kde).
*/
std::filesystem::path get_xdg_restore_token_path() {
#ifdef SUNSHINE_BUILD_PORTAL
return portal::get_saved_token_path();
#else
return appdata() / "portal_token";
#endif
}
/**
* @brief Convert a socket address to a printable IP address.
*/