This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository enlightenment.
View the commit online.
commit 6cca3f77e8b34d8b25315d31e6e3cb73ad63ff20
Author: Carsten Haitzler <[email protected]>
AuthorDate: Mon Dec 12 19:52:46 2022 +0000
ibar - kill off ibar not in order icon if last window for exe goes away
@fix
---
src/modules/ibar/e_mod_main.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/src/modules/ibar/e_mod_main.c b/src/modules/ibar/e_mod_main.c
index 46bd424dd..988aed0cf 100644
--- a/src/modules/ibar/e_mod_main.c
+++ b/src/modules/ibar/e_mod_main.c
@@ -2702,6 +2702,35 @@ _ibar_cb_client_prop(void *d EINA_UNUSED, int t EINA_UNUSED, E_Event_Client_Prop
return ECORE_CALLBACK_RENEW;
}
+static Eina_Bool
+_ibar_cb_client_del(void *d EINA_UNUSED, int t EINA_UNUSED, E_Event_Client *ev)
+{
+ IBar *b;
+ Eina_List *l, *ll;
+ E_Exec_Instance *exe;
+ int client_num = 0;
+
+ if (!ev->ec->desktop) return ECORE_CALLBACK_RENEW; //can't do anything here :(
+ EINA_LIST_FOREACH(ibars, l, b)
+ {
+ IBar_Icon *ic;
+
+ ic = eina_hash_find(b->icon_hash, _desktop_name_get(ev->ec->desktop));
+ if (ic)
+ {
+ if (ic->not_in_order)
+ {
+ EINA_LIST_FOREACH(ic->exes, ll, exe)
+ {
+ client_num += eina_list_count(exe->clients);
+ }
+ if (client_num == 0) _ibar_icon_free(ic);
+ }
+ }
+ }
+ return ECORE_CALLBACK_RENEW;
+}
+
static Eina_Bool
_ibar_cb_exec_del(void *d EINA_UNUSED, int t EINA_UNUSED, E_Exec_Instance *exe)
{
@@ -2891,6 +2920,8 @@ e_modapi_init(E_Module *m)
_ibar_cb_exec_del, NULL);
E_LIST_HANDLER_APPEND(ibar_config->handlers, E_EVENT_CLIENT_PROPERTY,
_ibar_cb_client_prop, NULL);
+ E_LIST_HANDLER_APPEND(ibar_config->handlers, E_EVENT_CLIENT_REMOVE,
+ _ibar_cb_client_del, NULL);
e_gadcon_provider_register(&_gadcon_class);
ibar_orders = eina_hash_string_superfast_new(NULL);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.