Re: [E-devel] [EGIT] [core/enlightenment] master 01/01: Luncher Improvements: Don't add multiple global handlers for the same events and don't show preview immediately for iconic.
Fixed On Mon, May 22, 2017 at 1:20 PM Stephen Houstonwrote: > On Mon, May 22, 2017 at 1:18 PM Stephen Houston > wrote: > >> On Mon, May 22, 2017 at 1:05 PM Mike Blumenkrantz < >> michael.blumenkra...@gmail.com> wrote: >> >>> On Mon, May 22, 2017 at 2:02 PM Stephen 'Okra' Houston < >>> smhousto...@gmail.com> wrote: >>> >>> > okra pushed a commit to branch master. >>> > >>> > >>> > >>> http://git.enlightenment.org/core/enlightenment.git/commit/?id=171686f0a91339443353288b3e005fbc0503fc1b >>> > >>> > commit 171686f0a91339443353288b3e005fbc0503fc1b >>> > Author: Stephen 'Okra' Houston >>> > Date: Mon May 22 13:01:12 2017 -0500 >>> > >>> > Luncher Improvements: Don't add multiple global handlers for the >>> same >>> > events and don't show preview immediately for iconic. >>> > >>> > This fixes T5377 >>> > --- >>> > src/modules/luncher/bar.c | 92 >>> > +-- >>> > 1 file changed, 24 insertions(+), 68 deletions(-) >>> > >>> > diff --git a/src/modules/luncher/bar.c b/src/modules/luncher/bar.c >>> > index 20c082d..5f50663 100644 >>> > --- a/src/modules/luncher/bar.c >>> > +++ b/src/modules/luncher/bar.c >>> > @@ -33,29 +33,6 @@ _bar_aspect(Instance *inst) >>> > } >>> > >>> > static Eina_Bool >>> > -_bar_check_for_iconic(Icon *ic) >>> > -{ >>> > - Eina_List *l, *ll, *clients = NULL; >>> > - E_Client *ec; >>> > - E_Exec_Instance *ex; >>> > - >>> > - EINA_LIST_FOREACH(ic->execs, l, ex) >>> > - { >>> > -EINA_LIST_FOREACH(ex->clients, ll, ec) >>> > - clients = eina_list_append(clients, ec); >>> > - } >>> > - EINA_LIST_FOREACH(ic->clients, l, ec) >>> > - clients = eina_list_append(clients, ec); >>> > - >>> > - EINA_LIST_FREE(clients, ec) >>> > - { >>> > - if (ec->iconic) >>> > -return EINA_TRUE; >>> > - } >>> > - return EINA_FALSE; >>> > -} >>> > - >>> > -static Eina_Bool >>> > _bar_check_for_duplicates(Icon *ic, E_Client *dupe) >>> > { >>> > Eina_List *l, *ll, *clients = NULL; >>> > @@ -990,8 +967,6 @@ _bar_icon_mouse_in(void *data, Evas *e EINA_UNUSED, >>> > Evas_Object *obj, void *even >>> > clients = EINA_TRUE; >>> > if (clients && ic->inst->current_preview && >>> > !ic->inst->current_preview_menu) >>> > _bar_icon_preview_show(ic); >>> > - else if (_bar_check_for_iconic(ic)) >>> > - _bar_icon_preview_show(ic); >>> > else if (clients && !ic->inst->current_preview) >>> > ic->mouse_in_timer = ecore_timer_loop_add(0.3, >>> > _bar_icon_preview_show, ic); >>> > } >>> > @@ -1014,8 +989,6 @@ _bar_exec_new_show(void *data, Evas *e >>> EINA_UNUSED, >>> > Evas_Object *obj, void *even >>> > E_FREE_FUNC(ic->mouse_in_timer, ecore_timer_del); >>> > if (ic->inst->current_preview && >>> > !ic->inst->current_preview_menu) >>> > _bar_icon_preview_show(ic); >>> > - else if (_bar_check_for_iconic(ic)) >>> > - _bar_icon_preview_show(ic); >>> > else if (!ic->inst->current_preview) >>> > ic->mouse_in_timer = ecore_timer_loop_add(0.3, >>> > _bar_icon_preview_show, ic); >>> >} >>> > @@ -1783,6 +1756,7 @@ static void >>> > _bar_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj >>> EINA_UNUSED, >>> > void *event_data EINA_UNUSED) >>> > { >>> > Instance *inst = data; >>> > + Ecore_Event_Handler *handler; >>> > >>> > inst->main_del = EINA_TRUE; >>> > _bar_empty(inst); >>> > @@ -1792,6 +1766,11 @@ _bar_del(void *data, Evas *e EINA_UNUSED, >>> > Evas_Object *obj EINA_UNUSED, void *ev >>> > eina_hash_free(inst->icons_clients_hash); >>> > luncher_instances = eina_list_remove(luncher_instances, inst); >>> > free(inst); >>> > + if (!eina_list_count(luncher_instances)) >>> > + { >>> > +EINA_LIST_FREE(handlers, handler) >>> > + E_FREE_FUNC(handler, ecore_event_handler_del); >>> > + } >>> > } >>> > >>> > static void >>> > @@ -1894,15 +1873,11 @@ _bar_removed_cb(void *data, Evas_Object *obj >>> > EINA_UNUSED, void *event_data) >>> > { >>> > Instance *inst = data; >>> > char buf[4096]; >>> > - Ecore_Event_Handler *handler; >>> > >>> > if (inst->o_main != event_data) return; >>> > if (e_user_dir_snprintf(buf, sizeof(buf), "applications/bar/%s", >>> > inst->cfg->dir) >= sizeof(buf)) >>> > return; >>> > >>> > - EINA_LIST_FREE(handlers, handler) >>> > - E_FREE_FUNC(handler, ecore_event_handler_del); >>> > - >>> > E_FREE_FUNC(inst->iconify_provider, >>> e_comp_object_effect_mover_del); >>> > >>> > luncher_config->items = eina_list_remove(luncher_config->items, >>> > inst->cfg); >>> > @@ -2108,30 +2083,8 @@ bar_reorder(Instance *inst) >>> > EINTERN void >>> > bar_config_updated(Instance *inst) >>> > { >>> > - Ecore_Event_Handler *handler; >>> > const char *drop[] = { "enlightenment/desktop", >>> >
Re: [E-devel] [EGIT] [core/enlightenment] master 01/01: Luncher Improvements: Don't add multiple global handlers for the same events and don't show preview immediately for iconic.
On Mon, May 22, 2017 at 1:18 PM Stephen Houstonwrote: > On Mon, May 22, 2017 at 1:05 PM Mike Blumenkrantz < > michael.blumenkra...@gmail.com> wrote: > >> On Mon, May 22, 2017 at 2:02 PM Stephen 'Okra' Houston < >> smhousto...@gmail.com> wrote: >> >> > okra pushed a commit to branch master. >> > >> > >> > >> http://git.enlightenment.org/core/enlightenment.git/commit/?id=171686f0a91339443353288b3e005fbc0503fc1b >> > >> > commit 171686f0a91339443353288b3e005fbc0503fc1b >> > Author: Stephen 'Okra' Houston >> > Date: Mon May 22 13:01:12 2017 -0500 >> > >> > Luncher Improvements: Don't add multiple global handlers for the >> same >> > events and don't show preview immediately for iconic. >> > >> > This fixes T5377 >> > --- >> > src/modules/luncher/bar.c | 92 >> > +-- >> > 1 file changed, 24 insertions(+), 68 deletions(-) >> > >> > diff --git a/src/modules/luncher/bar.c b/src/modules/luncher/bar.c >> > index 20c082d..5f50663 100644 >> > --- a/src/modules/luncher/bar.c >> > +++ b/src/modules/luncher/bar.c >> > @@ -33,29 +33,6 @@ _bar_aspect(Instance *inst) >> > } >> > >> > static Eina_Bool >> > -_bar_check_for_iconic(Icon *ic) >> > -{ >> > - Eina_List *l, *ll, *clients = NULL; >> > - E_Client *ec; >> > - E_Exec_Instance *ex; >> > - >> > - EINA_LIST_FOREACH(ic->execs, l, ex) >> > - { >> > -EINA_LIST_FOREACH(ex->clients, ll, ec) >> > - clients = eina_list_append(clients, ec); >> > - } >> > - EINA_LIST_FOREACH(ic->clients, l, ec) >> > - clients = eina_list_append(clients, ec); >> > - >> > - EINA_LIST_FREE(clients, ec) >> > - { >> > - if (ec->iconic) >> > -return EINA_TRUE; >> > - } >> > - return EINA_FALSE; >> > -} >> > - >> > -static Eina_Bool >> > _bar_check_for_duplicates(Icon *ic, E_Client *dupe) >> > { >> > Eina_List *l, *ll, *clients = NULL; >> > @@ -990,8 +967,6 @@ _bar_icon_mouse_in(void *data, Evas *e EINA_UNUSED, >> > Evas_Object *obj, void *even >> > clients = EINA_TRUE; >> > if (clients && ic->inst->current_preview && >> > !ic->inst->current_preview_menu) >> > _bar_icon_preview_show(ic); >> > - else if (_bar_check_for_iconic(ic)) >> > - _bar_icon_preview_show(ic); >> > else if (clients && !ic->inst->current_preview) >> > ic->mouse_in_timer = ecore_timer_loop_add(0.3, >> > _bar_icon_preview_show, ic); >> > } >> > @@ -1014,8 +989,6 @@ _bar_exec_new_show(void *data, Evas *e EINA_UNUSED, >> > Evas_Object *obj, void *even >> > E_FREE_FUNC(ic->mouse_in_timer, ecore_timer_del); >> > if (ic->inst->current_preview && >> > !ic->inst->current_preview_menu) >> > _bar_icon_preview_show(ic); >> > - else if (_bar_check_for_iconic(ic)) >> > - _bar_icon_preview_show(ic); >> > else if (!ic->inst->current_preview) >> > ic->mouse_in_timer = ecore_timer_loop_add(0.3, >> > _bar_icon_preview_show, ic); >> >} >> > @@ -1783,6 +1756,7 @@ static void >> > _bar_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, >> > void *event_data EINA_UNUSED) >> > { >> > Instance *inst = data; >> > + Ecore_Event_Handler *handler; >> > >> > inst->main_del = EINA_TRUE; >> > _bar_empty(inst); >> > @@ -1792,6 +1766,11 @@ _bar_del(void *data, Evas *e EINA_UNUSED, >> > Evas_Object *obj EINA_UNUSED, void *ev >> > eina_hash_free(inst->icons_clients_hash); >> > luncher_instances = eina_list_remove(luncher_instances, inst); >> > free(inst); >> > + if (!eina_list_count(luncher_instances)) >> > + { >> > +EINA_LIST_FREE(handlers, handler) >> > + E_FREE_FUNC(handler, ecore_event_handler_del); >> > + } >> > } >> > >> > static void >> > @@ -1894,15 +1873,11 @@ _bar_removed_cb(void *data, Evas_Object *obj >> > EINA_UNUSED, void *event_data) >> > { >> > Instance *inst = data; >> > char buf[4096]; >> > - Ecore_Event_Handler *handler; >> > >> > if (inst->o_main != event_data) return; >> > if (e_user_dir_snprintf(buf, sizeof(buf), "applications/bar/%s", >> > inst->cfg->dir) >= sizeof(buf)) >> > return; >> > >> > - EINA_LIST_FREE(handlers, handler) >> > - E_FREE_FUNC(handler, ecore_event_handler_del); >> > - >> > E_FREE_FUNC(inst->iconify_provider, e_comp_object_effect_mover_del); >> > >> > luncher_config->items = eina_list_remove(luncher_config->items, >> > inst->cfg); >> > @@ -2108,30 +2083,8 @@ bar_reorder(Instance *inst) >> > EINTERN void >> > bar_config_updated(Instance *inst) >> > { >> > - Ecore_Event_Handler *handler; >> > const char *drop[] = { "enlightenment/desktop", >> > "enlightenment/border", "text/uri-list" }; >> > >> > - EINA_LIST_FREE(handlers, handler) >> > - E_FREE_FUNC(handler, ecore_event_handler_del); >> > - >> > - E_LIST_HANDLER_APPEND(handlers, E_EVENT_CONFIG_ICON_THEME, >> > -
Re: [E-devel] [EGIT] [core/enlightenment] master 01/01: Luncher Improvements: Don't add multiple global handlers for the same events and don't show preview immediately for iconic.
On Mon, May 22, 2017 at 1:05 PM Mike Blumenkrantz < michael.blumenkra...@gmail.com> wrote: > On Mon, May 22, 2017 at 2:02 PM Stephen 'Okra' Houston < > smhousto...@gmail.com> wrote: > > > okra pushed a commit to branch master. > > > > > > > http://git.enlightenment.org/core/enlightenment.git/commit/?id=171686f0a91339443353288b3e005fbc0503fc1b > > > > commit 171686f0a91339443353288b3e005fbc0503fc1b > > Author: Stephen 'Okra' Houston> > Date: Mon May 22 13:01:12 2017 -0500 > > > > Luncher Improvements: Don't add multiple global handlers for the same > > events and don't show preview immediately for iconic. > > > > This fixes T5377 > > --- > > src/modules/luncher/bar.c | 92 > > +-- > > 1 file changed, 24 insertions(+), 68 deletions(-) > > > > diff --git a/src/modules/luncher/bar.c b/src/modules/luncher/bar.c > > index 20c082d..5f50663 100644 > > --- a/src/modules/luncher/bar.c > > +++ b/src/modules/luncher/bar.c > > @@ -33,29 +33,6 @@ _bar_aspect(Instance *inst) > > } > > > > static Eina_Bool > > -_bar_check_for_iconic(Icon *ic) > > -{ > > - Eina_List *l, *ll, *clients = NULL; > > - E_Client *ec; > > - E_Exec_Instance *ex; > > - > > - EINA_LIST_FOREACH(ic->execs, l, ex) > > - { > > -EINA_LIST_FOREACH(ex->clients, ll, ec) > > - clients = eina_list_append(clients, ec); > > - } > > - EINA_LIST_FOREACH(ic->clients, l, ec) > > - clients = eina_list_append(clients, ec); > > - > > - EINA_LIST_FREE(clients, ec) > > - { > > - if (ec->iconic) > > -return EINA_TRUE; > > - } > > - return EINA_FALSE; > > -} > > - > > -static Eina_Bool > > _bar_check_for_duplicates(Icon *ic, E_Client *dupe) > > { > > Eina_List *l, *ll, *clients = NULL; > > @@ -990,8 +967,6 @@ _bar_icon_mouse_in(void *data, Evas *e EINA_UNUSED, > > Evas_Object *obj, void *even > > clients = EINA_TRUE; > > if (clients && ic->inst->current_preview && > > !ic->inst->current_preview_menu) > > _bar_icon_preview_show(ic); > > - else if (_bar_check_for_iconic(ic)) > > - _bar_icon_preview_show(ic); > > else if (clients && !ic->inst->current_preview) > > ic->mouse_in_timer = ecore_timer_loop_add(0.3, > > _bar_icon_preview_show, ic); > > } > > @@ -1014,8 +989,6 @@ _bar_exec_new_show(void *data, Evas *e EINA_UNUSED, > > Evas_Object *obj, void *even > > E_FREE_FUNC(ic->mouse_in_timer, ecore_timer_del); > > if (ic->inst->current_preview && > > !ic->inst->current_preview_menu) > > _bar_icon_preview_show(ic); > > - else if (_bar_check_for_iconic(ic)) > > - _bar_icon_preview_show(ic); > > else if (!ic->inst->current_preview) > > ic->mouse_in_timer = ecore_timer_loop_add(0.3, > > _bar_icon_preview_show, ic); > >} > > @@ -1783,6 +1756,7 @@ static void > > _bar_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, > > void *event_data EINA_UNUSED) > > { > > Instance *inst = data; > > + Ecore_Event_Handler *handler; > > > > inst->main_del = EINA_TRUE; > > _bar_empty(inst); > > @@ -1792,6 +1766,11 @@ _bar_del(void *data, Evas *e EINA_UNUSED, > > Evas_Object *obj EINA_UNUSED, void *ev > > eina_hash_free(inst->icons_clients_hash); > > luncher_instances = eina_list_remove(luncher_instances, inst); > > free(inst); > > + if (!eina_list_count(luncher_instances)) > > + { > > +EINA_LIST_FREE(handlers, handler) > > + E_FREE_FUNC(handler, ecore_event_handler_del); > > + } > > } > > > > static void > > @@ -1894,15 +1873,11 @@ _bar_removed_cb(void *data, Evas_Object *obj > > EINA_UNUSED, void *event_data) > > { > > Instance *inst = data; > > char buf[4096]; > > - Ecore_Event_Handler *handler; > > > > if (inst->o_main != event_data) return; > > if (e_user_dir_snprintf(buf, sizeof(buf), "applications/bar/%s", > > inst->cfg->dir) >= sizeof(buf)) > > return; > > > > - EINA_LIST_FREE(handlers, handler) > > - E_FREE_FUNC(handler, ecore_event_handler_del); > > - > > E_FREE_FUNC(inst->iconify_provider, e_comp_object_effect_mover_del); > > > > luncher_config->items = eina_list_remove(luncher_config->items, > > inst->cfg); > > @@ -2108,30 +2083,8 @@ bar_reorder(Instance *inst) > > EINTERN void > > bar_config_updated(Instance *inst) > > { > > - Ecore_Event_Handler *handler; > > const char *drop[] = { "enlightenment/desktop", > > "enlightenment/border", "text/uri-list" }; > > > > - EINA_LIST_FREE(handlers, handler) > > - E_FREE_FUNC(handler, ecore_event_handler_del); > > - > > - E_LIST_HANDLER_APPEND(handlers, E_EVENT_CONFIG_ICON_THEME, > > - _bar_cb_update_icons, NULL); > > - E_LIST_HANDLER_APPEND(handlers, EFREET_EVENT_ICON_CACHE_UPDATE, > > - _bar_cb_update_icons, NULL); > > - if (inst->cfg->type !=
Re: [E-devel] [EGIT] [core/enlightenment] master 01/01: Luncher Improvements: Don't add multiple global handlers for the same events and don't show preview immediately for iconic.
On Mon, May 22, 2017 at 2:02 PM Stephen 'Okra' Houston < smhousto...@gmail.com> wrote: > okra pushed a commit to branch master. > > > http://git.enlightenment.org/core/enlightenment.git/commit/?id=171686f0a91339443353288b3e005fbc0503fc1b > > commit 171686f0a91339443353288b3e005fbc0503fc1b > Author: Stephen 'Okra' Houston> Date: Mon May 22 13:01:12 2017 -0500 > > Luncher Improvements: Don't add multiple global handlers for the same > events and don't show preview immediately for iconic. > > This fixes T5377 > --- > src/modules/luncher/bar.c | 92 > +-- > 1 file changed, 24 insertions(+), 68 deletions(-) > > diff --git a/src/modules/luncher/bar.c b/src/modules/luncher/bar.c > index 20c082d..5f50663 100644 > --- a/src/modules/luncher/bar.c > +++ b/src/modules/luncher/bar.c > @@ -33,29 +33,6 @@ _bar_aspect(Instance *inst) > } > > static Eina_Bool > -_bar_check_for_iconic(Icon *ic) > -{ > - Eina_List *l, *ll, *clients = NULL; > - E_Client *ec; > - E_Exec_Instance *ex; > - > - EINA_LIST_FOREACH(ic->execs, l, ex) > - { > -EINA_LIST_FOREACH(ex->clients, ll, ec) > - clients = eina_list_append(clients, ec); > - } > - EINA_LIST_FOREACH(ic->clients, l, ec) > - clients = eina_list_append(clients, ec); > - > - EINA_LIST_FREE(clients, ec) > - { > - if (ec->iconic) > -return EINA_TRUE; > - } > - return EINA_FALSE; > -} > - > -static Eina_Bool > _bar_check_for_duplicates(Icon *ic, E_Client *dupe) > { > Eina_List *l, *ll, *clients = NULL; > @@ -990,8 +967,6 @@ _bar_icon_mouse_in(void *data, Evas *e EINA_UNUSED, > Evas_Object *obj, void *even > clients = EINA_TRUE; > if (clients && ic->inst->current_preview && > !ic->inst->current_preview_menu) > _bar_icon_preview_show(ic); > - else if (_bar_check_for_iconic(ic)) > - _bar_icon_preview_show(ic); > else if (clients && !ic->inst->current_preview) > ic->mouse_in_timer = ecore_timer_loop_add(0.3, > _bar_icon_preview_show, ic); > } > @@ -1014,8 +989,6 @@ _bar_exec_new_show(void *data, Evas *e EINA_UNUSED, > Evas_Object *obj, void *even > E_FREE_FUNC(ic->mouse_in_timer, ecore_timer_del); > if (ic->inst->current_preview && > !ic->inst->current_preview_menu) > _bar_icon_preview_show(ic); > - else if (_bar_check_for_iconic(ic)) > - _bar_icon_preview_show(ic); > else if (!ic->inst->current_preview) > ic->mouse_in_timer = ecore_timer_loop_add(0.3, > _bar_icon_preview_show, ic); >} > @@ -1783,6 +1756,7 @@ static void > _bar_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, > void *event_data EINA_UNUSED) > { > Instance *inst = data; > + Ecore_Event_Handler *handler; > > inst->main_del = EINA_TRUE; > _bar_empty(inst); > @@ -1792,6 +1766,11 @@ _bar_del(void *data, Evas *e EINA_UNUSED, > Evas_Object *obj EINA_UNUSED, void *ev > eina_hash_free(inst->icons_clients_hash); > luncher_instances = eina_list_remove(luncher_instances, inst); > free(inst); > + if (!eina_list_count(luncher_instances)) > + { > +EINA_LIST_FREE(handlers, handler) > + E_FREE_FUNC(handler, ecore_event_handler_del); > + } > } > > static void > @@ -1894,15 +1873,11 @@ _bar_removed_cb(void *data, Evas_Object *obj > EINA_UNUSED, void *event_data) > { > Instance *inst = data; > char buf[4096]; > - Ecore_Event_Handler *handler; > > if (inst->o_main != event_data) return; > if (e_user_dir_snprintf(buf, sizeof(buf), "applications/bar/%s", > inst->cfg->dir) >= sizeof(buf)) > return; > > - EINA_LIST_FREE(handlers, handler) > - E_FREE_FUNC(handler, ecore_event_handler_del); > - > E_FREE_FUNC(inst->iconify_provider, e_comp_object_effect_mover_del); > > luncher_config->items = eina_list_remove(luncher_config->items, > inst->cfg); > @@ -2108,30 +2083,8 @@ bar_reorder(Instance *inst) > EINTERN void > bar_config_updated(Instance *inst) > { > - Ecore_Event_Handler *handler; > const char *drop[] = { "enlightenment/desktop", > "enlightenment/border", "text/uri-list" }; > > - EINA_LIST_FREE(handlers, handler) > - E_FREE_FUNC(handler, ecore_event_handler_del); > - > - E_LIST_HANDLER_APPEND(handlers, E_EVENT_CONFIG_ICON_THEME, > - _bar_cb_update_icons, NULL); > - E_LIST_HANDLER_APPEND(handlers, EFREET_EVENT_ICON_CACHE_UPDATE, > - _bar_cb_update_icons, NULL); > - if (inst->cfg->type != E_LUNCHER_MODULE_LAUNCH_ONLY) > - { > -E_LIST_HANDLER_APPEND(handlers, E_EVENT_EXEC_NEW, > - _bar_cb_exec_new, NULL); > -E_LIST_HANDLER_APPEND(handlers, E_EVENT_EXEC_NEW_CLIENT, > - _bar_cb_exec_new, NULL); > -E_LIST_HANDLER_APPEND(handlers, E_EVENT_CLIENT_PROPERTY, > -