billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=e8214d1da290c184a4ac40b6375ac1630e1bcda1

commit e8214d1da290c184a4ac40b6375ac1630e1bcda1
Author: Boris Faure <bill...@gmail.com>
Date:   Tue Mar 13 18:15:57 2018 +0100

    tabs: on tab selector, be sure only one tab is focused
---
 src/bin/win.c | 20 +++++++++++++++-----
 1 file 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)
      {

-- 


Reply via email to