refocus other split when closing one. Closes T3239

This commit is contained in:
Boris Faure 2016-03-03 13:01:19 +01:00
parent 02db084b27
commit 815dddd880
1 changed files with 10 additions and 0 deletions

View File

@ -247,6 +247,7 @@ _solo_size_eval(Term_Container *container, Sizeinfo *info)
static void
_solo_close(Term_Container *tc, Term_Container *child EINA_UNUSED)
{
DBG("close");
tc->parent->close(tc->parent, tc);
eina_stringshare_del(tc->title);
@ -821,6 +822,8 @@ _win_swallow(Term_Container *tc, Term_Container *orig,
wn = (Win*) tc;
base = win_base_get(wn);
DBG("orig:%p", orig);
if (orig)
{
o = orig->get_evas_object(orig);
@ -1325,6 +1328,8 @@ _split_close(Term_Container *tc, Term_Container *child)
assert (tc->type == TERM_CONTAINER_TYPE_SPLIT);
split = (Split*) tc;
DBG("close");
top = elm_object_part_content_unset(split->panes, PANES_TOP);
bottom = elm_object_part_content_unset(split->panes, PANES_BOTTOM);
evas_object_hide(top);
@ -1334,6 +1339,11 @@ _split_close(Term_Container *tc, Term_Container *child)
other_child = (child == split->tc1) ? split->tc2 : split->tc1;
parent->swallow(parent, tc, other_child);
if (tc->is_focused)
{
other_child->focus(other_child, parent);
}
evas_object_del(split->panes);
eina_stringshare_del(tc->title);