forked from enlightenment/efl
elm - when focus goes back in to a window dont have scrollers jump
there is an annoyance in elm that when focus goes back toa window it restores focus to the last focused widget. if that widget happens to be invisible in a scroller then this is really annoying as the scrollers reset. this makes restoring optional. only if there is a hilight object AND it's visible - then restore, otherwise don't and revert focus to the window itself again. @fix
This commit is contained in:
parent
be2ae5f410
commit
9d5b9872fb
|
@ -1084,7 +1084,19 @@ _elm_win_focus_in(Ecore_Evas *ee)
|
|||
elm_widget_focus_steal(obj);
|
||||
}
|
||||
else
|
||||
elm_widget_focus_restore(obj);
|
||||
{
|
||||
Evas_Object *newest = NULL;
|
||||
unsigned int newest_focus_order = 0;
|
||||
|
||||
newest = elm_widget_newest_focus_order_get
|
||||
(obj, &newest_focus_order, EINA_TRUE);
|
||||
if ((newest) &&
|
||||
_elm_win_focus_highlight_object_get(obj) &&
|
||||
_elm_widget_onscreen_is(newest))
|
||||
elm_widget_focus_restore(obj);
|
||||
else
|
||||
evas_object_focus_set(obj, EINA_TRUE);
|
||||
}
|
||||
}
|
||||
// FIXME: the event is deprecated but still in use.
|
||||
// Has to be removed in EFL2.0
|
||||
|
|
Loading…
Reference in New Issue