aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/win.c
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2016-03-03 13:01:19 +0100
committerBoris Faure <billiob@gmail.com>2016-03-03 13:01:19 +0100
commit815dddd880b7ec943581ee75ec6f19e16358b3c0 (patch)
tree916472e785cc24ecdcc3ee097d28a21105628e2a /src/bin/win.c
parentwip (diff)
downloadterminology-815dddd880b7ec943581ee75ec6f19e16358b3c0.tar.gz
refocus other split when closing one. Closes https://phab.enlightenment.org/T3239
Diffstat (limited to 'src/bin/win.c')
-rw-r--r--src/bin/win.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bin/win.c b/src/bin/win.c
index 88aa885..b8c891c 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -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);