discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=7f0a4154f57ea76f5d69cc988276d0db7144985c
commit 7f0a4154f57ea76f5d69cc988276d0db7144985c Author: Mike Blumenkrantz <zm...@osg.samsung.com> Date: Fri Feb 2 16:59:56 2018 -0500 efl-wl: add function for passing ecore-exe flags to launched exes @feature --- src/lib/efl_wl/Efl_Wl.h | 13 +++++++++++++ src/lib/efl_wl/efl_wl.c | 16 ++++++++++++++-- 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) { --