discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e8d24596a690443f73c44547b4df244e1990bd27

commit e8d24596a690443f73c44547b4df244e1990bd27
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Fri Feb 2 16:59:56 2018 -0500

    efl-wl: add functions for managing allowed client pids
    
    @feature
---
 src/lib/efl_wl/Efl_Wl.h | 18 ++++++++++++++++++
 src/lib/efl_wl/efl_wl.c | 26 ++++++++++++++++++++++++--
 2 files changed, 42 insertions(+), 2 deletions(-)

diff --git a/src/lib/efl_wl/Efl_Wl.h b/src/lib/efl_wl/Efl_Wl.h
index d27dedde28..2a6133676a 100644
--- a/src/lib/efl_wl/Efl_Wl.h
+++ b/src/lib/efl_wl/Efl_Wl.h
@@ -66,6 +66,24 @@ EAPI Evas_Object *efl_wl_add(Evas *e);
 EAPI Ecore_Exe *efl_wl_run(Evas_Object *obj, const char *cmd);
 
 /**
+ * Add a process to the list of allowed clients for the compositor widget
+ *
+ * @param obj The compositor widget
+ * @param pid The process to allow
+ * @since 1.21
+ */
+EAPI void efl_wl_pid_add(Evas_Object *obj, int32_t pid);
+
+/**
+ * Remove a process from the list of allowed clients for the compositor widget
+ *
+ * @param obj The compositor widget
+ * @param pid The process to deny
+ * @since 1.21
+ */
+EAPI void efl_wl_pid_del(Evas_Object *obj, int32_t pid);
+
+/**
  * Put the bottom-most toplevel window on top and apply focus to it
  *
  * @param obj The compositor widget
diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c
index 4c16eb6c33..7f4461438b 100644
--- a/src/lib/efl_wl/efl_wl.c
+++ b/src/lib/efl_wl/efl_wl.c
@@ -5667,12 +5667,34 @@ efl_wl_run(Evas_Object *obj, const char *cmd)
    if (exe)
      {
         int32_t pid = ecore_exe_pid_get(exe);
-        ecore_exe_tag_set(exe, "__efl_wl");
-        eina_hash_add(c->exes, &pid, exe);
+        eina_hash_add(c->exes, &pid, (void*)1);
      }
    return exe;
 }
 
+void
+efl_wl_pid_add(Evas_Object *obj, int32_t pid)
+{
+   Comp *c;
+
+   if (!eina_streq(evas_object_type_get(obj), "comp")) abort();
+   c = evas_object_smart_data_get(obj);
+   if (!c->exes)
+     c->exes = eina_hash_int32_new(NULL);
+   eina_hash_add(c->exes, &pid, (void*)1);
+}
+
+void
+efl_wl_pid_del(Evas_Object *obj, int32_t pid)
+{
+   Comp *c;
+
+   if (!eina_streq(evas_object_type_get(obj), "comp")) abort();
+   c = evas_object_smart_data_get(obj);
+   if (!c->exes) return;
+   eina_hash_del_by_key(c->exes, &pid);
+}
+
 Eina_Bool
 efl_wl_next(Evas_Object *obj)
 {

-- 


Reply via email to