summaryrefslogtreecommitdiff
path: root/src/lib/emotion
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-01-04 10:10:38 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-01-04 10:12:33 -0500
commite6d53d1e67bd688112e3544238c80c487045fc4f (patch)
tree61e6eb931dfbaee77b75e830aecb9782b30a4295 /src/lib/emotion
parent214dbdbd590a8f3fd9a0f3d5ef975d6ff9ce0e43 (diff)
emotion: unset DISPLAY when loading an engine under wayland
ensure that this doesn't trigger xwayland deadlocks during gst init probably fixes T6418 @fix
Diffstat (limited to 'src/lib/emotion')
-rw-r--r--src/lib/emotion/emotion_modules.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/emotion/emotion_modules.c b/src/lib/emotion/emotion_modules.c
index 944ea01..3aa0f06 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
360 const Emotion_Engine *engine; 360 const Emotion_Engine *engine;
361 void *data; 361 void *data;
362 Eina_Module *m; 362 Eina_Module *m;
363 char *disp = NULL;
363 364
364 _emotion_modules_load(); 365 _emotion_modules_load();
365 366
@@ -369,6 +370,13 @@ emotion_engine_instance_new(const char *name, Evas_Object *obj, Emotion_Module_O
369 DBG("using EMOTION_ENGINE=%s", name); 370 DBG("using EMOTION_ENGINE=%s", name);
370 } 371 }
371 372
373 if (getenv("WAYLAND_DISPLAY"))
374 {
375 disp = eina_strdup(getenv("DISPLAY"));
376 unsetenv("DISPLAY");
377 }
378
379
372 if (name) 380 if (name)
373 { 381 {
374 m = _find_mod(name); 382 m = _find_mod(name);
@@ -401,6 +409,8 @@ emotion_engine_instance_new(const char *name, Evas_Object *obj, Emotion_Module_O
401 if (data) 409 if (data)
402 { 410 {
403 INF("Using requested engine %s, data=%p", name, data); 411 INF("Using requested engine %s, data=%p", name, data);
412 if (disp) setenv("DISPLAY", disp, 1);
413 free(disp);
404 return _emotion_engine_instance_new(engine, obj, data); 414 return _emotion_engine_instance_new(engine, obj, data);
405 } 415 }
406 416
@@ -418,11 +428,15 @@ emotion_engine_instance_new(const char *name, Evas_Object *obj, Emotion_Module_O
418 if (data) 428 if (data)
419 { 429 {
420 INF("Using fallback engine %s, data=%p", engine->name, data); 430 INF("Using fallback engine %s, data=%p", engine->name, data);
431 if (disp) setenv("DISPLAY", disp, 1);
432 free(disp);
421 return _emotion_engine_instance_new(engine, obj, data); 433 return _emotion_engine_instance_new(engine, obj, data);
422 } 434 }
423 } 435 }
424 436
425 ERR("No engine worked"); 437 ERR("No engine worked");
438 if (disp) setenv("DISPLAY", disp, 1);
439 free(disp);
426 return NULL; 440 return NULL;
427} 441}
428 442