forked from enlightenment/terminology
fix focus issue with multiple tabs
This commit is contained in:
parent
43fc3eff04
commit
8be1c44d61
|
@ -755,18 +755,32 @@ static Term *
|
||||||
_find_term_under_mouse(Win *wn)
|
_find_term_under_mouse(Win *wn)
|
||||||
{
|
{
|
||||||
Evas_Coord mx, my;
|
Evas_Coord mx, my;
|
||||||
const Eina_List *l;
|
Split *sp;
|
||||||
Term *term;
|
|
||||||
|
|
||||||
evas_pointer_canvas_xy_get(evas_object_evas_get(wn->win), &mx, &my);
|
evas_pointer_canvas_xy_get(evas_object_evas_get(wn->win), &mx, &my);
|
||||||
|
|
||||||
EINA_LIST_FOREACH(wn->terms, l, term)
|
sp = wn->split;
|
||||||
|
while (sp)
|
||||||
{
|
{
|
||||||
Evas_Coord ox, oy, ow, oh;
|
if (sp->term)
|
||||||
|
{
|
||||||
|
return sp->term;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Evas_Coord ox, oy, ow, oh;
|
||||||
|
Evas_Object *o1 = sp->s1->panes ? sp->s1->panes : sp->s1->term->base;
|
||||||
|
|
||||||
evas_object_geometry_get(term->bg, &ox, &oy, &ow, &oh);
|
evas_object_geometry_get(o1, &ox, &oy, &ow, &oh);
|
||||||
if (ELM_RECTS_INTERSECT(ox, oy, ow, oh, mx, my, 1, 1))
|
if (ELM_RECTS_INTERSECT(ox, oy, ow, oh, mx, my, 1, 1))
|
||||||
return term;
|
{
|
||||||
|
sp = sp->s1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sp = sp->s2;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue