summaryrefslogtreecommitdiffstats
path: root/src/pulse/context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulse/context.c')
-rw-r--r--src/pulse/context.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/pulse/context.c b/src/pulse/context.c
index 85b90ac7..83e0dbb5 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
@@ -987,13 +987,15 @@ int pa_context_connect(
/* Prepend in reverse order */
/* Follow the X display */
- if ((d = getenv("DISPLAY"))) {
- d = pa_xstrndup(d, strcspn(d, ":"));
+ if (c->conf->auto_connect_display) {
+ if ((d = getenv("DISPLAY"))) {
+ d = pa_xstrndup(d, strcspn(d, ":"));
- if (*d)
- c->server_list = pa_strlist_prepend(c->server_list, d);
+ if (*d)
+ c->server_list = pa_strlist_prepend(c->server_list, d);
- pa_xfree(d);
+ pa_xfree(d);
+ }
}
/* Add TCP/IP on the localhost */