diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-07-20 17:34:17 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-07-20 17:34:17 +0200 |
commit | 18e975fc5ef68a89875c77974570884b9214a009 (patch) | |
tree | e0346c369315e71f386190c19ad4a1c06d5b526e /src/pulse/client-conf-x11.c | |
parent | 3a09a88fd1f3dfe365dc1f3e455c097010d00964 (diff) |
mergedrtpoll
Diffstat (limited to 'src/pulse/client-conf-x11.c')
-rw-r--r-- | src/pulse/client-conf-x11.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/pulse/client-conf-x11.c b/src/pulse/client-conf-x11.c index 3bec742f..4970363b 100644 --- a/src/pulse/client-conf-x11.c +++ b/src/pulse/client-conf-x11.c @@ -57,8 +57,23 @@ int pa_client_conf_from_x11(pa_client_conf *c, const char *dname) { } if (pa_x11_get_prop(d, "PULSE_SERVER", t, sizeof(t))) { + pa_bool_t disable_autospawn = TRUE; + pa_xfree(c->default_server); c->default_server = pa_xstrdup(t); + + if (pa_x11_get_prop(d, "PULSE_SESSION_ID", t, sizeof(t))) { + char *id; + + if ((id = pa_session_id())) { + if (pa_streq(t, id)) + disable_autospawn = FALSE; + pa_xfree(id); + } + } + + if (disable_autospawn) + c->autospawn = FALSE; } if (pa_x11_get_prop(d, "PULSE_SINK", t, sizeof(t))) { |