forked from enlightenment/efl
efl_ui_focus_manager:do not followup if we have not changed candidate
_followup_previous_direction should only be called if there was a real change to the redirect. In was happening that we have not changed the focus but called _followup_previous_direction, which lead to weird focus changes.
This commit is contained in:
parent
f8badf1c06
commit
ffca5284ae
|
@ -1495,7 +1495,8 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_move(Eo *obj EINA_UNUSED, Efl_Ui
|
||||||
if (new_candidate)
|
if (new_candidate)
|
||||||
efl_ui_focus_manager_focus_set(obj, new_candidate);
|
efl_ui_focus_manager_focus_set(obj, new_candidate);
|
||||||
|
|
||||||
if (direction == ELM_FOCUS_PREVIOUS)
|
//for the case that this caused a redirect to be set AND we had a candidate, make sure we setup the other direction correctly
|
||||||
|
if (direction == ELM_FOCUS_PREVIOUS && new_candidate)
|
||||||
_followup_previous_direction(obj);
|
_followup_previous_direction(obj);
|
||||||
|
|
||||||
candidate = new_candidate;
|
candidate = new_candidate;
|
||||||
|
@ -1529,7 +1530,7 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_move(Eo *obj EINA_UNUSED, Efl_Ui
|
||||||
if (candidate)
|
if (candidate)
|
||||||
{
|
{
|
||||||
efl_ui_focus_manager_focus_set(obj, candidate);
|
efl_ui_focus_manager_focus_set(obj, candidate);
|
||||||
if (direction == ELM_FOCUS_PREVIOUS)
|
if (direction == ELM_FOCUS_PREVIOUS && candidate)
|
||||||
_followup_previous_direction(obj);
|
_followup_previous_direction(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue