summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-05-06 13:40:03 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-05-06 13:40:03 -0400
commit01c261e9f70dd194ccc4780f2717b7d68e9fd480 (patch)
treecb2a971fe56ada8ab14fcca2ca921fa059b664f6
parented25a5005f97b826f9ab00afd3cb9f39889e9283 (diff)
unset DISPLAY during mixer's pulse backend startup
fixes more xwayland deadlocks
-rw-r--r--src/modules/Makefile_mixer.mk2
-rw-r--r--src/modules/mixer/lib/backends/pulseaudio/pulse.c17
2 files changed, 18 insertions, 1 deletions
diff --git a/src/modules/Makefile_mixer.mk b/src/modules/Makefile_mixer.mk
index f5368f719..4f90cf103 100644
--- a/src/modules/Makefile_mixer.mk
+++ b/src/modules/Makefile_mixer.mk
@@ -25,7 +25,7 @@ src_modules_mixer_emixerdir = $(mixerpkgdir)
25bin_PROGRAMS += src/modules/mixer/emixer 25bin_PROGRAMS += src/modules/mixer/emixer
26src_modules_mixer_emixer_SOURCES = src/modules/mixer/emixer.c \ 26src_modules_mixer_emixer_SOURCES = src/modules/mixer/emixer.c \
27 $(emixerlib) 27 $(emixerlib)
28src_modules_mixer_emixer_CPPFLAGS = $(MOD_CPPFLAGS) @e_cflags@ -I$(top_srcdir)/src/modules/mixer/lib 28src_modules_mixer_emixer_CPPFLAGS = $(MOD_CPPFLAGS) -I$(top_srcdir)/src/modules/mixer/lib -DEMIXER_BUILD
29src_modules_mixer_emixer_LDADD = $(MOD_LIBS) @PULSE_LIBS@ @ALSA_LIBS@ 29src_modules_mixer_emixer_LDADD = $(MOD_LIBS) @PULSE_LIBS@ @ALSA_LIBS@
30 30
31src_modules_mixer_module_la_CPPFLAGS = $(MOD_CPPFLAGS) @e_cflags@ @ALSA_CFLAGS@ @PULSE_CFLAGS@ -I$(top_srcdir)/src/modules/mixer/lib 31src_modules_mixer_module_la_CPPFLAGS = $(MOD_CPPFLAGS) @e_cflags@ @ALSA_CFLAGS@ @PULSE_CFLAGS@ -I$(top_srcdir)/src/modules/mixer/lib
diff --git a/src/modules/mixer/lib/backends/pulseaudio/pulse.c b/src/modules/mixer/lib/backends/pulseaudio/pulse.c
index 8c2cf4153..966031865 100644
--- a/src/modules/mixer/lib/backends/pulseaudio/pulse.c
+++ b/src/modules/mixer/lib/backends/pulseaudio/pulse.c
@@ -781,6 +781,16 @@ _pulse_connect(void *data)
781 pa_proplist_sets(proplist, PA_PROP_APPLICATION_ID, 781 pa_proplist_sets(proplist, PA_PROP_APPLICATION_ID,
782 "org.enlightenment.volumecontrol"); 782 "org.enlightenment.volumecontrol");
783 pa_proplist_sets(proplist, PA_PROP_APPLICATION_ICON_NAME, "audio-card"); 783 pa_proplist_sets(proplist, PA_PROP_APPLICATION_ICON_NAME, "audio-card");
784#if !defined(EMIXER_BUILD) && defined(HAVE_WAYLAND) && !defined(HAVE_WAYLAND_ONLY)
785 char *display;
786
787 if (e_comp->comp_type != E_PIXMAP_TYPE_X)
788 {
789 display = getenv("DISPLAY");
790 if (display) display = strdup(display);
791 e_env_unset("DISPLAY");
792 }
793#endif
784 c->context = pa_context_new_with_proplist(&(c->api), NULL, proplist); 794 c->context = pa_context_new_with_proplist(&(c->api), NULL, proplist);
785 if (!c->context) 795 if (!c->context)
786 { 796 {
@@ -794,6 +804,13 @@ _pulse_connect(void *data)
794 WRN("Could not connect to pulse"); 804 WRN("Could not connect to pulse");
795 goto err; 805 goto err;
796 } 806 }
807#if !defined(EMIXER_BUILD) && defined(HAVE_WAYLAND) && !defined(HAVE_WAYLAND_ONLY)
808 if (e_comp->comp_type != E_PIXMAP_TYPE_X)
809 {
810 e_env_set("DISPLAY", display);
811 free(display);
812 }
813#endif
797 814
798 pa_proplist_free(proplist); 815 pa_proplist_free(proplist);
799 return ECORE_CALLBACK_DONE; 816 return ECORE_CALLBACK_DONE;