raster pushed a commit to branch efl-1.20.

http://git.enlightenment.org/core/efl.git/commit/?id=9f5c04cf7612df231e2602c97fa9d1c9775fd432

commit 9f5c04cf7612df231e2602c97fa9d1c9775fd432
Author: Mike Blumenkrantz <[email protected]>
Date:   Thu Jan 4 10:10:38 2018 -0500

    emotion: unset DISPLAY when loading an engine under wayland
    
    ensure that this doesn't trigger xwayland deadlocks during gst init
    
    probably fixes T6418
    
    @fix
---
 src/lib/emotion/emotion_modules.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/lib/emotion/emotion_modules.c 
b/src/lib/emotion/emotion_modules.c
index 944ea0184d..3aa0f0643f 100644
--- a/src/lib/emotion/emotion_modules.c
+++ b/src/lib/emotion/emotion_modules.c
@@ -360,6 +360,7 @@ emotion_engine_instance_new(const char *name, Evas_Object 
*obj, Emotion_Module_O
    const Emotion_Engine *engine;
    void *data;
    Eina_Module *m;
+   char *disp = NULL;
 
    _emotion_modules_load();
 
@@ -369,6 +370,13 @@ emotion_engine_instance_new(const char *name, Evas_Object 
*obj, Emotion_Module_O
         DBG("using EMOTION_ENGINE=%s", name);
      }
 
+   if (getenv("WAYLAND_DISPLAY"))
+     {
+        disp = eina_strdup(getenv("DISPLAY"));
+        unsetenv("DISPLAY");
+     }
+
+
    if (name)
      {
         m = _find_mod(name);
@@ -401,6 +409,8 @@ emotion_engine_instance_new(const char *name, Evas_Object 
*obj, Emotion_Module_O
              if (data)
                {
                   INF("Using requested engine %s, data=%p", name, data);
+                  if (disp) setenv("DISPLAY", disp, 1);
+                  free(disp);
                   return _emotion_engine_instance_new(engine, obj, data);
                }
 
@@ -418,11 +428,15 @@ emotion_engine_instance_new(const char *name, Evas_Object 
*obj, Emotion_Module_O
         if (data)
           {
              INF("Using fallback engine %s, data=%p", engine->name, data);
+             if (disp) setenv("DISPLAY", disp, 1);
+             free(disp);
              return _emotion_engine_instance_new(engine, obj, data);
           }
      }
 
    ERR("No engine worked");
+   if (disp) setenv("DISPLAY", disp, 1);
+   free(disp);
    return NULL;
 }
 

-- 


Reply via email to