X-Git-Url: https://code.delx.au/pulseaudio/blobdiff_plain/3d6cc026e25ea3015ea989273ba69336a26ab686..21cbcc1a8a5900af9e820b10d5c1b28fc803f947:/src/pulse/context.c 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 */