aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2018-03-13 18:15:57 +0100
committerBoris Faure <billiob@gmail.com>2018-03-13 18:15:57 +0100
commite8214d1da290c184a4ac40b6375ac1630e1bcda1 (patch)
tree54d17e88fc14dd369ef93d07730e8893f6b46b6d
parenttermptygfx: fix stupid bug when printing encircled numbers (diff)
downloadterminology-e8214d1da290c184a4ac40b6375ac1630e1bcda1.tar.gz
tabs: on tab selector, be sure only one tab is focused
-rw-r--r--src/bin/win.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/bin/win.c b/src/bin/win.c
index cb2c10c..0223fcb 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -450,7 +450,10 @@ _solo_focus(Term_Container *tc, Term_Container *relative)
term->missed_bell = EINA_FALSE;
if (tc->parent != relative)
- tc->parent->focus(tc->parent, tc);
+ {
+ DBG("focus tc:%p", tc);
+ tc->parent->focus(tc->parent, tc);
+ }
tc->is_focused = EINA_TRUE;
if (term->config->disable_focus_visuals)
@@ -584,9 +587,14 @@ _cb_win_focus_in(void *data,
}
if (term)
- _term_focus(term);
+ {
+ _term_focus(term);
+ }
else
- tc->focus(tc, tc);
+ {
+ DBG("focus tc:%p", tc);
+ tc->focus(tc, tc);
+ }
}
static void
@@ -2693,6 +2701,8 @@ _tabs_restore(Tabs *tabs)
EINA_LIST_FOREACH(tabs->tabs, l, tab_item)
{
tab_item->selector_entry = NULL;
+ if (tab_item->tc->is_focused)
+ tab_item->tc->unfocus(tab_item->tc, tc);
}
evas_object_smart_callback_del_full(tabs->selector, "selected",
@@ -2713,6 +2723,7 @@ _tabs_restore(Tabs *tabs)
_tabbar_clear(term);
_tabs_refresh(tabs);
+ tabs->current->tc->unfocus(tabs->current->tc, tabs->current->tc);
tabs->current->tc->focus(tabs->current->tc, tabs->current->tc);
}
@@ -2722,6 +2733,7 @@ _tabs_selector_cb_ending(void *data,
void *_info EINA_UNUSED)
{
Tabs *tabs = data;
+
edje_object_signal_emit(tabs->selector_bg, "end", "terminology");
}
@@ -2785,8 +2797,6 @@ _cb_tab_selector_show(Tabs *tabs, Tab_Item *to_item)
background_set_shine(wn->config, tabs->selector_bg);
edje_object_signal_emit(tabs->selector_bg, "begin", "terminology");
- tab_item = tabs->current;
-
tabs->selector = sel_add(wn->win);
EINA_LIST_FOREACH(tabs->tabs, l, tab_item)
{