summaryrefslogtreecommitdiff
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
parent32c293bea42b6f10d2b8ef82e2cec1ecb67c27ee (diff)
efl-wl: add function for passing ecore-exe flags to launched exes
@feature
-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);
66EAPI Ecore_Exe *efl_wl_run(Evas_Object *obj, const char *cmd); 66EAPI Ecore_Exe *efl_wl_run(Evas_Object *obj, const char *cmd);
67 67
68/** 68/**
69 * Run a command in the compositor widget with specified flags.
70 *
71 * @note If GL is available, the ELM_ACCEL environment variable will be
72 * set to "gl" while executing the command.
73 *
74 * @param obj The compositor widget
75 * @param cmd The command to run
76 * @param flags The flags to use
77 * @return The Ecore_Exe from the executed process, @c NULL on failure
78 */
79Ecore_Exe *efl_wl_flags_run(Evas_Object *obj, const char *cmd, Ecore_Exe_Flags flags);
80
81/**
69 * Add a process to the list of allowed clients for the compositor widget 82 * Add a process to the list of allowed clients for the compositor widget
70 * 83 *
71 * @param obj The compositor widget 84 * @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)
5625} 5625}
5626 5626
5627Ecore_Exe * 5627Ecore_Exe *
5628efl_wl_run(Evas_Object *obj, const char *cmd) 5628comp_run(Evas_Object *obj, const char *cmd, Ecore_Exe_Flags flags)
5629{ 5629{
5630 char *env, *disp, *gl = NULL; 5630 char *env, *disp, *gl = NULL;
5631 Comp *c; 5631 Comp *c;
@@ -5650,7 +5650,7 @@ efl_wl_run(Evas_Object *obj, const char *cmd)
5650 if (gl) gl = strdup(gl); 5650 if (gl) gl = strdup(gl);
5651 setenv("ELM_ACCEL", "gl", 1); 5651 setenv("ELM_ACCEL", "gl", 1);
5652 } 5652 }
5653 exe = ecore_exe_pipe_run(cmd, ECORE_EXE_TERM_WITH_PARENT, c); 5653 exe = ecore_exe_pipe_run(cmd, flags, c);
5654 if (disp) setenv("DISPLAY", disp, 1); 5654 if (disp) setenv("DISPLAY", disp, 1);
5655 if (env) setenv("WAYLAND_DISPLAY", env, 1); 5655 if (env) setenv("WAYLAND_DISPLAY", env, 1);
5656 else unsetenv("WAYLAND_DISPLAY"); 5656 else unsetenv("WAYLAND_DISPLAY");
@@ -5670,6 +5670,18 @@ efl_wl_run(Evas_Object *obj, const char *cmd)
5670 return exe; 5670 return exe;
5671} 5671}
5672 5672
5673Ecore_Exe *
5674efl_wl_run(Evas_Object *obj, const char *cmd)
5675{
5676 return comp_run(obj, cmd, ECORE_EXE_TERM_WITH_PARENT);
5677}
5678
5679Ecore_Exe *
5680efl_wl_flags_run(Evas_Object *obj, const char *cmd, Ecore_Exe_Flags flags)
5681{
5682 return comp_run(obj, cmd, flags);
5683}
5684
5673void 5685void
5674efl_wl_pid_add(Evas_Object *obj, int32_t pid) 5686efl_wl_pid_add(Evas_Object *obj, int32_t pid)
5675{ 5687{