mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
modules: set pipewire.access.portal.app_id in access & pulse-server
When detecting a access=flatpak application, set also pipewire.access.portal.app_id, if determined
This commit is contained in:
parent
3730e54484
commit
0e12242a1b
2 changed files with 27 additions and 10 deletions
|
|
@ -418,14 +418,20 @@ on_connect(void *data, int fd, uint32_t mask)
|
|||
client_access = server->client_access;
|
||||
|
||||
if (server->addr.ss_family == AF_UNIX) {
|
||||
char *app_id = NULL;
|
||||
|
||||
#ifdef SO_PRIORITY
|
||||
val = 6;
|
||||
if (setsockopt(client_fd, SOL_SOCKET, SO_PRIORITY, &val, sizeof(val)) < 0)
|
||||
pw_log_warn("setsockopt(SO_PRIORITY) failed: %m");
|
||||
#endif
|
||||
pid = get_client_pid(client, client_fd);
|
||||
if (pid != 0 && pw_check_flatpak(pid, NULL, NULL) == 1)
|
||||
if (pid != 0 && pw_check_flatpak(pid, &app_id, NULL) == 1) {
|
||||
client_access = "flatpak";
|
||||
pw_properties_set(client->props, "pipewire.access.portal.app_id",
|
||||
app_id);
|
||||
}
|
||||
free(app_id);
|
||||
}
|
||||
else if (server->addr.ss_family == AF_INET || server->addr.ss_family == AF_INET6) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue