aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/efl_wl
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-02-02 16:59:56 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-02-02 16:59:44 -0500
commit7f0a4154f57ea76f5d69cc988276d0db7144985c (patch)
treeb43d9c849d61b3ebbe83efff7834098d0cc35142 /src/lib/efl_wl
parentefl-wl: no need to check exe tag on app del, just remove pid always (diff)
downloadefl-7f0a4154f57ea76f5d69cc988276d0db7144985c.tar.gz
efl-wl: add function for passing ecore-exe flags to launched exes
@feature
Diffstat (limited to 'src/lib/efl_wl')
-rw-r--r--src/lib/efl_wl/Efl_Wl.h13
-rw-r--r--src/lib/efl_wl/efl_wl.c16
2 files changed, 27 insertions, 2 deletions
diff --git a/src/lib/efl_wl/Efl_Wl.h b/src/lib/efl_wl/Efl_Wl.h
index 2a6133676a..9124926373 100644
--- a/src/lib/efl_wl/Efl_Wl.h
+++ b/src/lib/efl_wl/Efl_Wl.h
@@ -66,6 +66,19 @@ EAPI Evas_Object *efl_wl_add(Evas *e);
EAPI Ecore_Exe *efl_wl_run(Evas_Object *obj, const char *cmd);
/**
+ * Run a command in the compositor widget with specified flags.
+ *
+ * @note If GL is available, the ELM_ACCEL environment variable will be
+ * set to "gl" while executing the command.
+ *
+ * @param obj The compositor widget
+ * @param cmd The command to run
+ * @param flags The flags to use
+ * @return The Ecore_Exe from the executed process, @c NULL on failure
+ */
+Ecore_Exe *efl_wl_flags_run(Evas_Object *obj, const char *cmd, Ecore_Exe_Flags flags);
+
+/**
* Add a process to the list of allowed clients for the compositor widget
*
* @param obj The compositor widget
diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c
index b4dd91fcb7..a9dda23b5a 100644
--- a/src/lib/efl_wl/efl_wl.c
+++ b/src/lib/efl_wl/efl_wl.c
@@ -5625,7 +5625,7 @@ efl_wl_add(Evas *e)
}
Ecore_Exe *
-efl_wl_run(Evas_Object *obj, const char *cmd)
+comp_run(Evas_Object *obj, const char *cmd, Ecore_Exe_Flags flags)
{
char *env, *disp, *gl = NULL;
Comp *c;
@@ -5650,7 +5650,7 @@ efl_wl_run(Evas_Object *obj, const char *cmd)
if (gl) gl = strdup(gl);
setenv("ELM_ACCEL", "gl", 1);
}
- exe = ecore_exe_pipe_run(cmd, ECORE_EXE_TERM_WITH_PARENT, c);
+ exe = ecore_exe_pipe_run(cmd, flags, c);
if (disp) setenv("DISPLAY", disp, 1);
if (env) setenv("WAYLAND_DISPLAY", env, 1);
else unsetenv("WAYLAND_DISPLAY");
@@ -5670,6 +5670,18 @@ efl_wl_run(Evas_Object *obj, const char *cmd)
return exe;
}
+Ecore_Exe *
+efl_wl_run(Evas_Object *obj, const char *cmd)
+{
+ return comp_run(obj, cmd, ECORE_EXE_TERM_WITH_PARENT);
+}
+
+Ecore_Exe *
+efl_wl_flags_run(Evas_Object *obj, const char *cmd, Ecore_Exe_Flags flags)
+{
+ return comp_run(obj, cmd, flags);
+}
+
void
efl_wl_pid_add(Evas_Object *obj, int32_t pid)
{