Luncher: Remove closed clients from the preview popup if visible, and close the popup if no more clients are active.

This fixes T5097
This commit is contained in:
Stephen 'Okra' Houston 2017-02-06 11:12:43 -06:00
parent a89afe4186
commit e41dfc7d5b
1 changed files with 18 additions and 0 deletions

View File

@ -1159,9 +1159,15 @@ _bar_cb_client_remove(void *data EINA_UNUSED, int type EINA_UNUSED, E_Event_Clie
{
snprintf(ori, sizeof(ori), "e,state,off,%s", _bar_location_get(inst));
elm_layout_signal_emit(ic->o_layout, ori, "e");
if (ic->preview)
_bar_icon_preview_hide(ic);
if (!ic->in_order)
_bar_icon_del(inst, ic);
}
else if (ic->preview)
{
_bar_icon_preview_show(ic);
}
}
}
return ECORE_CALLBACK_RENEW;
@ -1202,9 +1208,15 @@ _bar_cb_exec_del(void *data EINA_UNUSED, int type EINA_UNUSED, E_Exec_Instance *
{
snprintf(ori, sizeof(ori), "e,state,off,%s", _bar_location_get(inst));
elm_layout_signal_emit(ic->o_layout, ori, "e");
if (ic->preview)
_bar_icon_preview_hide(ic);
if (!ic->in_order)
_bar_icon_del(inst, ic);
}
else if (ic->preview)
{
_bar_icon_preview_show(ic);
}
}
}
return ECORE_CALLBACK_RENEW;
@ -1303,6 +1315,8 @@ _bar_cb_exec_client_prop(void *data EINA_UNUSED, int type EINA_UNUSED, E_Event_C
ic->clients = eina_list_remove(ic->clients, ev->ec);
if (!eina_list_count(ic->execs) && !eina_list_count(ic->clients))
{
if (ic->preview)
_bar_icon_preview_hide(ic);
if (!ic->in_order)
_bar_icon_del(inst, ic);
else
@ -1311,6 +1325,10 @@ _bar_cb_exec_client_prop(void *data EINA_UNUSED, int type EINA_UNUSED, E_Event_C
elm_layout_signal_emit(ic->o_layout, ori, "e");
}
}
else if (ic->preview)
{
_bar_icon_preview_show(ic);
}
}
}
return ECORE_CALLBACK_RENEW;