aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-02-13 10:48:14 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-02-13 10:48:14 -0500
commit66030a4639cfc07f77782c7a105d39eeed7fb64a (patch)
treeaa42612daa31760b88975a709e4d13689c56d7b9
parentremove gadget runner function stubs for pre 1.21 compat (diff)
downloadenlightenment-66030a4639cfc07f77782c7a105d39eeed7fb64a.tar.gz
set E_GADGET_ORIENTATION env var when launching sandbox gadgets
-rw-r--r--src/bin/e_gadget_runner.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/bin/e_gadget_runner.c b/src/bin/e_gadget_runner.c
index 57b3b1697..e1a1c53de 100644
--- a/src/bin/e_gadget_runner.c
+++ b/src/bin/e_gadget_runner.c
@@ -101,6 +101,19 @@ runner_run(Instance *inst)
snprintf(buf, sizeof(buf), "%d", inst->ci->id);
e_util_env_set("E_GADGET_ID", buf);
+ switch (e_gadget_site_orient_get(e_gadget_site_get(inst->box)))
+ {
+ case E_GADGET_SITE_ORIENT_NONE:
+ e_util_env_set("E_GADGET_ORIENTATION", "None");
+ break;
+ case E_GADGET_SITE_ORIENT_HORIZONTAL:
+ e_util_env_set("E_GADGET_ORIENTATION", "Horizontal");
+ break;
+ case E_GADGET_SITE_ORIENT_VERTICAL:
+ e_util_env_set("E_GADGET_ORIENTATION", "Vertical");
+ break;
+ }
+ e_util_env_set("E_GADGET_ID", buf);
unshare(CLONE_NEWPID);
@@ -108,6 +121,7 @@ runner_run(Instance *inst)
setns(ns_fd, CLONE_NEWPID);
+ e_util_env_set("E_GADGET_ORIENTATION", NULL);
e_util_env_set("E_GADGET_ID", NULL);
e_util_env_set("LD_PRELOAD", preload);
free(preload);