diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2016-07-18 15:50:23 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2016-07-18 15:50:23 +0900 |
commit | c72113eca8a6537ce5e420adc82a43ea139cadc1 (patch) | |
tree | 1bef9191726b99f4b56287ec5b3ba24ab77d08fe /src/modules/ibar | |
parent | 382fe306889385638470cc88c7df37c9cd79fdc5 (diff) | |
download | enlightenment-c72113eca8a6537ce5e420adc82a43ea139cadc1.tar.gz |
e ibar/ibox fix starrting/started signal emittion
i found this didn't emit signals correctly and multiple times when not
needed. this fixes that.
@fix
Diffstat (limited to 'src/modules/ibar')
-rw-r--r-- | src/modules/ibar/e_mod_main.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/modules/ibar/e_mod_main.c b/src/modules/ibar/e_mod_main.c index 3f805ecf78..ca96bd8a8d 100644 --- a/src/modules/ibar/e_mod_main.c +++ b/src/modules/ibar/e_mod_main.c @@ -90,6 +90,7 @@ struct _IBar_Icon Eina_Bool focused : 1; Eina_Bool not_in_order : 1; Eina_Bool menu_grabbed : 1; + Eina_Bool starting : 1; }; static IBar *_ibar_new(Evas_Object *parent, Instance *inst); @@ -1736,7 +1737,8 @@ _ibar_instance_watch(void *data, E_Exec_Instance *inst, E_Exec_Watch_Type type) switch (type) { case E_EXEC_WATCH_STARTED: - _ibar_icon_signal_emit(ic, "e,state,started", "e"); + if (ic->starting) _ibar_icon_signal_emit(ic, "e,state,started", "e"); + ic->starting = EINA_FALSE; if (!ic->exes) _ibar_icon_signal_emit(ic, "e,state,on", "e"); if (ic->exe_inst == inst) ic->exe_inst = NULL; if (!eina_list_data_find(ic->exes, inst)) @@ -1789,7 +1791,8 @@ _ibar_icon_go(IBar_Icon *ic, Eina_Bool keep_going) { ic->exe_inst = einst; e_exec_instance_watcher_add(einst, _ibar_instance_watch, ic); - _ibar_icon_signal_emit(ic, "e,state,starting", "e"); + if (!ic->starting) _ibar_icon_signal_emit(ic, "e,state,starting", "e"); + ic->starting = EINA_TRUE; } } } @@ -2606,7 +2609,8 @@ _ibar_cb_client_prop(void *d EINA_UNUSED, int t EINA_UNUSED, E_Event_Client_Prop { if (ic) { - _ibar_icon_signal_emit(ic, "e,state,started", "e"); + if (ic->starting) _ibar_icon_signal_emit(ic, "e,state,started", "e"); + ic->starting = EINA_FALSE; if (!ic->exes) _ibar_icon_signal_emit(ic, "e,state,on", "e"); if (!eina_list_data_find(ic->exes, ev->ec->exe_inst)) ic->exes = eina_list_append(ic->exes, ev->ec->exe_inst); @@ -2655,7 +2659,8 @@ _ibar_cb_exec_del(void *d EINA_UNUSED, int t EINA_UNUSED, E_Exec_Instance *exe) ic = eina_hash_find(b->icon_hash, _desktop_name_get(exe->desktop)); if (ic) { - _ibar_icon_signal_emit(ic, "e,state,started", "e"); + if (ic->starting) _ibar_icon_signal_emit(ic, "e,state,started", "e"); + ic->starting = EINA_FALSE; ic->exes = eina_list_remove(ic->exes, exe); if (ic->exe_inst == exe) ic->exe_inst = NULL; if (!ic->exes) @@ -2696,7 +2701,8 @@ _ibar_cb_exec_new_client(void *d EINA_UNUSED, int t EINA_UNUSED, E_Exec_Instance ic = eina_hash_find(b->icon_hash, _desktop_name_get(exe->desktop)); if (ic) { - _ibar_icon_signal_emit(ic, "e,state,started", "e"); + if (ic->starting) _ibar_icon_signal_emit(ic, "e,state,started", "e"); + ic->starting = EINA_FALSE; if (!ic->exes) _ibar_icon_signal_emit(ic, "e,state,on", "e"); if (skip) continue; if (!eina_list_data_find(ic->exes, exe)) @@ -2742,7 +2748,6 @@ _ibar_cb_exec_new(void *d EINA_UNUSED, int t EINA_UNUSED, E_Exec_Instance *exe) ic = eina_hash_find(b->icon_hash, _desktop_name_get(exe->desktop)); if (ic) { - _ibar_icon_signal_emit(ic, "e,state,started", "e"); if (!ic->exes) _ibar_icon_signal_emit(ic, "e,state,on", "e"); if (skip) continue; if (!eina_list_data_find(ic->exes, exe)) |