discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=01c261e9f70dd194ccc4780f2717b7d68e9fd480

commit 01c261e9f70dd194ccc4780f2717b7d68e9fd480
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Fri May 6 13:40:03 2016 -0400

    unset DISPLAY during mixer's pulse backend startup
    
    fixes more xwayland deadlocks
---
 src/modules/Makefile_mixer.mk                     |  2 +-
 src/modules/mixer/lib/backends/pulseaudio/pulse.c | 17 +++++++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/src/modules/Makefile_mixer.mk b/src/modules/Makefile_mixer.mk
index f5368f7..4f90cf1 100644
--- a/src/modules/Makefile_mixer.mk
+++ b/src/modules/Makefile_mixer.mk
@@ -25,7 +25,7 @@ src_modules_mixer_emixerdir = $(mixerpkgdir)
 bin_PROGRAMS += src/modules/mixer/emixer
 src_modules_mixer_emixer_SOURCES = src/modules/mixer/emixer.c \
                           $(emixerlib)
-src_modules_mixer_emixer_CPPFLAGS = $(MOD_CPPFLAGS) @e_cflags@ 
-I$(top_srcdir)/src/modules/mixer/lib
+src_modules_mixer_emixer_CPPFLAGS = $(MOD_CPPFLAGS) 
-I$(top_srcdir)/src/modules/mixer/lib -DEMIXER_BUILD
 src_modules_mixer_emixer_LDADD = $(MOD_LIBS) @PULSE_LIBS@ @ALSA_LIBS@
 
 src_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 8c2cf41..9660318 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)
    pa_proplist_sets(proplist, PA_PROP_APPLICATION_ID,
                     "org.enlightenment.volumecontrol");
    pa_proplist_sets(proplist, PA_PROP_APPLICATION_ICON_NAME, "audio-card");
+#if !defined(EMIXER_BUILD) && defined(HAVE_WAYLAND) && 
!defined(HAVE_WAYLAND_ONLY)
+   char *display;
+
+   if (e_comp->comp_type != E_PIXMAP_TYPE_X)
+     {
+        display = getenv("DISPLAY");
+        if (display) display = strdup(display);
+        e_env_unset("DISPLAY");
+     }
+#endif
    c->context = pa_context_new_with_proplist(&(c->api), NULL, proplist);
    if (!c->context)
      {
@@ -794,6 +804,13 @@ _pulse_connect(void *data)
         WRN("Could not connect to pulse");
         goto err;
      }
+#if !defined(EMIXER_BUILD) && defined(HAVE_WAYLAND) && 
!defined(HAVE_WAYLAND_ONLY)
+   if (e_comp->comp_type != E_PIXMAP_TYPE_X)
+     {
+        e_env_set("DISPLAY", display);
+        free(display);
+     }
+#endif
 
    pa_proplist_free(proplist);
    return ECORE_CALLBACK_DONE;

-- 


Reply via email to