try grouping phony execs together

this saves a little memory and also makes related eventing more useful
This commit is contained in:
Mike Blumenkrantz 2014-01-17 19:02:56 -05:00
parent 49b9a2ea2a
commit d65ef1412f
1 changed files with 12 additions and 0 deletions

View File

@ -229,6 +229,18 @@ e_exec_phony(E_Client *ec)
E_Exec_Instance *inst;
Eina_List *l, *lnew;
if (ec->desktop)
{
/* try grouping with previous phony exec */
l = eina_hash_find(e_exec_instances, ec->desktop->orig_path ?: ec->desktop->name);
EINA_LIST_FOREACH(l, lnew, inst)
if (inst && inst->phony)
{
e_exec_instance_client_add(inst, ec);
return inst;
}
}
inst = E_NEW(E_Exec_Instance, 1);
inst->ref = 1;
inst->phony = 1;