summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2015-04-30 20:18:29 +0200
committerBoris Faure <billiob@gmail.com>2015-04-30 20:18:29 +0200
commitf64356baac159406357f7160df0c5c6ecc1220d7 (patch)
treeb6bca77491c51df371b1454f4953079cdf5d7ef1 /src
parent9e043c0425ad2cbdc1c355efd5552707825483e2 (diff)
fix focus issue. Closes T2376
Diffstat (limited to 'src')
-rw-r--r--src/bin/win.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/bin/win.c b/src/bin/win.c
index 0711f4d..69044c9 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -132,7 +132,7 @@ static Eina_Bool _term_is_focused(Term *term);
132static Term_Container *_solo_new(Term *term, Win *wn); 132static Term_Container *_solo_new(Term *term, Win *wn);
133static Term_Container *_split_new(Term_Container *tc1, Term_Container *tc2, Eina_Bool is_horizontal); 133static Term_Container *_split_new(Term_Container *tc1, Term_Container *tc2, Eina_Bool is_horizontal);
134static Term_Container *_tabs_new(Term_Container *child, Term_Container *parent); 134static Term_Container *_tabs_new(Term_Container *child, Term_Container *parent);
135static void _term_focus(Term *term, Eina_Bool force); 135static void _term_focus(Term *term);
136static void _term_free(Term *term); 136static void _term_free(Term *term);
137static void _term_media_update(Term *term, const Config *config); 137static void _term_media_update(Term *term, const Config *config);
138static void _term_miniview_check(Term *term); 138static void _term_miniview_check(Term *term);
@@ -441,7 +441,7 @@ _cb_win_focus_in(void *data,
441 } 441 }
442 442
443 if (term) 443 if (term)
444 _term_focus(term, EINA_TRUE); 444 _term_focus(term);
445 else 445 else
446 tc->focus(tc, tc); 446 tc->focus(tc, tc);
447} 447}
@@ -1525,7 +1525,7 @@ _cb_tab_activate(void *data, Evas_Object *obj EINA_UNUSED,
1525 assert (tab_item->tc->type == TERM_CONTAINER_TYPE_SOLO); 1525 assert (tab_item->tc->type == TERM_CONTAINER_TYPE_SOLO);
1526 solo = (Solo*)tab_item->tc; 1526 solo = (Solo*)tab_item->tc;
1527 term = solo->term; 1527 term = solo->term;
1528 _term_focus(term, EINA_TRUE); 1528 _term_focus(term);
1529} 1529}
1530 1530
1531static void 1531static void
@@ -2565,7 +2565,7 @@ _cb_term_mouse_in(void *data, Evas *e EINA_UNUSED,
2565 if (!_win_is_focused(term->wn)) 2565 if (!_win_is_focused(term->wn))
2566 return; 2566 return;
2567 2567
2568 _term_focus(term, EINA_TRUE); 2568 _term_focus(term);
2569} 2569}
2570 2570
2571static void 2571static void
@@ -2582,7 +2582,7 @@ _cb_term_mouse_down(void *data, Evas *e EINA_UNUSED,
2582 if (term == term2) return; 2582 if (term == term2) return;
2583 term->down.x = ev->canvas.x; 2583 term->down.x = ev->canvas.x;
2584 term->down.y = ev->canvas.y; 2584 term->down.y = ev->canvas.y;
2585 _term_focus(term, EINA_TRUE); 2585 _term_focus(term);
2586} 2586}
2587 2587
2588static Eina_Bool 2588static Eina_Bool
@@ -2626,11 +2626,11 @@ void change_theme(Evas_Object *win, Config *config)
2626} 2626}
2627 2627
2628static void 2628static void
2629_term_focus(Term *term, Eina_Bool force) 2629_term_focus(Term *term)
2630{ 2630{
2631 Term_Container *tc; 2631 Term_Container *tc;
2632 2632
2633 if (!force && (_term_is_focused(term) || !_win_is_focused(term->wn))) 2633 if (_term_is_focused(term) || !_win_is_focused(term->wn))
2634 return; 2634 return;
2635 2635
2636 tc = term->container; 2636 tc = term->container;
@@ -2659,7 +2659,7 @@ void term_prev(Term *term)
2659 tc = focused_term->container; 2659 tc = focused_term->container;
2660 new_term = tc->term_prev(tc, tc); 2660 new_term = tc->term_prev(tc, tc);
2661 if (new_term && new_term != focused_term) 2661 if (new_term && new_term != focused_term)
2662 _term_focus(new_term, EINA_FALSE); 2662 _term_focus(new_term);
2663 2663
2664 /* TODO: get rid of it? */ 2664 /* TODO: get rid of it? */
2665 _term_miniview_check(term); 2665 _term_miniview_check(term);
@@ -2687,7 +2687,7 @@ void term_next(Term *term)
2687 tc = focused_term->container; 2687 tc = focused_term->container;
2688 new_term = tc->term_next(tc, tc); 2688 new_term = tc->term_next(tc, tc);
2689 if (new_term && new_term != focused_term) 2689 if (new_term && new_term != focused_term)
2690 _term_focus(new_term, EINA_FALSE); 2690 _term_focus(new_term);
2691 2691
2692 /* TODO: get rid of it? */ 2692 /* TODO: get rid of it? */
2693 _term_miniview_check(term); 2693 _term_miniview_check(term);