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
commite8d24596a690443f73c44547b4df244e1990bd27 (patch)
tree1b6ecc02507c983a1c9a75f05fb3f10e0fecd3fd
parent3c380717456c6a49808c656ef3bddcddbc611437 (diff)
efl-wl: add functions for managing allowed client pids
@feature
-rw-r--r--src/lib/efl_wl/Efl_Wl.h18
-rw-r--r--src/lib/efl_wl/efl_wl.c26
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);
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 * Add a process to the list of allowed clients for the compositor widget
70 *
71 * @param obj The compositor widget
72 * @param pid The process to allow
73 * @since 1.21
74 */
75EAPI void efl_wl_pid_add(Evas_Object *obj, int32_t pid);
76
77/**
78 * Remove a process from the list of allowed clients for the compositor widget
79 *
80 * @param obj The compositor widget
81 * @param pid The process to deny
82 * @since 1.21
83 */
84EAPI void efl_wl_pid_del(Evas_Object *obj, int32_t pid);
85
86/**
69 * Put the bottom-most toplevel window on top and apply focus to it 87 * Put the bottom-most toplevel window on top and apply focus to it
70 * 88 *
71 * @param obj The compositor widget 89 * @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)
5667 if (exe) 5667 if (exe)
5668 { 5668 {
5669 int32_t pid = ecore_exe_pid_get(exe); 5669 int32_t pid = ecore_exe_pid_get(exe);
5670 ecore_exe_tag_set(exe, "__efl_wl"); 5670 eina_hash_add(c->exes, &pid, (void*)1);
5671 eina_hash_add(c->exes, &pid, exe);
5672 } 5671 }
5673 return exe; 5672 return exe;
5674} 5673}
5675 5674
5675void
5676efl_wl_pid_add(Evas_Object *obj, int32_t pid)
5677{
5678 Comp *c;
5679
5680 if (!eina_streq(evas_object_type_get(obj), "comp")) abort();
5681 c = evas_object_smart_data_get(obj);
5682 if (!c->exes)
5683 c->exes = eina_hash_int32_new(NULL);
5684 eina_hash_add(c->exes, &pid, (void*)1);
5685}
5686
5687void
5688efl_wl_pid_del(Evas_Object *obj, int32_t pid)
5689{
5690 Comp *c;
5691
5692 if (!eina_streq(evas_object_type_get(obj), "comp")) abort();
5693 c = evas_object_smart_data_get(obj);
5694 if (!c->exes) return;
5695 eina_hash_del_by_key(c->exes, &pid);
5696}
5697
5676Eina_Bool 5698Eina_Bool
5677efl_wl_next(Evas_Object *obj) 5699efl_wl_next(Evas_Object *obj)
5678{ 5700{