summaryrefslogtreecommitdiffstats
path: root/src/pulsecore
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-02-02 00:28:55 +0100
committerLennart Poettering <lennart@poettering.net>2009-02-02 00:28:55 +0100
commit16e369498cffd28a806f0ba7b173f3c669c0e820 (patch)
tree376750d91953c8c31cdc73fd443e4e3aec2ced9d /src/pulsecore
parent8ccc9aa6651f3a21be9c2e843d558b75c8fb0616 (diff)
set PA_PROP_WINDOW_X11_DISPLAY from :0.0 and initialize PA_PROP_APPLICATION_PROCESS_MACHINE_ID properly
Diffstat (limited to 'src/pulsecore')
-rw-r--r--src/pulsecore/proplist-util.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/pulsecore/proplist-util.c b/src/pulsecore/proplist-util.c
index 0a2d7183..4920c27e 100644
--- a/src/pulsecore/proplist-util.c
+++ b/src/pulsecore/proplist-util.c
@@ -136,4 +136,23 @@ void pa_init_proplist(pa_proplist *p) {
if ((l = setlocale(LC_MESSAGES, NULL)))
pa_proplist_sets(p, PA_PROP_APPLICATION_LANGUAGE, l);
}
+
+ if (!pa_proplist_contains(p, PA_PROP_WINDOW_X11_DISPLAY)) {
+ const char *t;
+
+ if ((t = getenv("DISPLAY"))) {
+ char *c = pa_utf8_filter(t);
+ pa_proplist_sets(p, PA_PROP_WINDOW_X11_DISPLAY, c);
+ pa_xfree(c);
+ }
+ }
+
+ if (!pa_proplist_contains(p, PA_PROP_APPLICATION_PROCESS_MACHINE_ID)) {
+ char *m;
+
+ if ((m = pa_machine_id())) {
+ pa_proplist_sets(p, PA_PROP_APPLICATION_PROCESS_MACHINE_ID, m);
+ pa_xfree(m);
+ }
+ }
}