aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-08-11 18:43:15 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-08-11 18:43:13 -0400
commitdc250e6101c7794d3923eb33f978580e0363142e (patch)
tree3b8e31f9a5e9059635a01994c4e5e40479d4e6bf
parentwayland: remove xdg5 support (diff)
downloadefl-dc250e6101c7794d3923eb33f978580e0363142e.tar.gz
efl-wl: add EFL_WL_DEBUG env variable for enabling wayland debug
@feature
-rw-r--r--src/lib/efl_wl/efl_wl.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c
index 069e4ed0c2..5c4fb32c04 100644
--- a/src/lib/efl_wl/efl_wl.c
+++ b/src/lib/efl_wl/efl_wl.c
@@ -4969,7 +4969,7 @@ static void
comp_smart_add(Evas_Object *obj)
{
Comp *c;
- char *env;
+ char *env, *dbg = NULL;
c = calloc(1, sizeof(Comp));
c->wayland_time_base = ecore_loop_time_get();
@@ -4977,7 +4977,19 @@ comp_smart_add(Evas_Object *obj)
evas_object_smart_data_set(obj, c);
env = getenv("WAYLAND_DISPLAY");
if (env) env = strdup(env);
+
+ if (getenv("EFL_WL_DEBUG"))
+ {
+ dbg = eina_strdup(getenv("WAYLAND_DEBUG"));
+ setenv("WAYLAND_DEBUG", "1", 1);
+ }
c->disp = ecore_wl2_display_create(NULL);
+ if (getenv("EFL_WL_DEBUG"))
+ {
+ if (dbg) setenv("WAYLAND_DEBUG", dbg, 1);
+ else unsetenv("WAYLAND_DEBUG");
+ free(dbg);
+ }
c->env = eina_strdup(getenv("WAYLAND_DISPLAY"));
if (env) setenv("WAYLAND_DISPLAY", env, 1);
else unsetenv("WAYLAND_DISPLAY");