aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/e_exec.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-09-17 11:51:04 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-09-17 11:51:04 +0000
commit7a59e5827395a1330f8658906d48fd65a9c16452 (patch)
tree21e69c7bb3a09c1d900177668258b041c3ddda0f /src/bin/e_exec.c
parent84bd5f65fc2e8839cd3508ddf452032ba61fdcd5 (diff)
downloadenlightenment-7a59e5827395a1330f8658906d48fd65a9c16452.tar.gz
enlightenment-7a59e5827395a1330f8658906d48fd65a9c16452.tar.xz
enlightenment-7a59e5827395a1330f8658906d48fd65a9c16452.zip
add support for X-Enlightenment-Single-Instance :)
SVN revision: 76756
Diffstat (limited to 'src/bin/e_exec.c')
-rw-r--r--src/bin/e_exec.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/bin/e_exec.c b/src/bin/e_exec.c
index 22f7bffac..2f9b1462b 100644
--- a/src/bin/e_exec.c
+++ b/src/bin/e_exec.c
@@ -99,8 +99,35 @@ e_exec(E_Zone *zone, Efreet_Desktop *desktop, const char *exec,
{
E_Exec_Launch *launch;
E_Exec_Instance *inst = NULL;
+ const char *single = NULL;
if ((!desktop) && (!exec)) return NULL;
+
+ single = eina_hash_find(desktop->x, "X-Enlightenment-Single-Instance");
+ if (single)
+ {
+ if ((!strcasecmp(single, "true")) ||
+ (!strcasecmp(single, "yes"))||
+ (!strcasecmp(single, "1")))
+ {
+ Eina_List *l;
+ E_Border *bd;
+
+ EINA_LIST_FOREACH(e_border_client_list(), l, bd)
+ {
+ if (bd->desktop == desktop)
+ {
+ if (bd)
+ {
+ if (!bd->focused) e_border_activate(bd, EINA_TRUE);
+ else e_border_raise(bd);
+ return NULL;
+ }
+ }
+ }
+ }
+ }
+
launch = E_NEW(E_Exec_Launch, 1);
if (!launch) return NULL;
if (zone)