bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ffca5284ae39dd4e454d1f45bbbfaebd703222a3

commit ffca5284ae39dd4e454d1f45bbbfaebd703222a3
Author: Marcel Hollerbach <[email protected]>
Date:   Fri Nov 17 10:10:08 2017 +0100

    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.
---
 src/lib/elementary/efl_ui_focus_manager_calc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/efl_ui_focus_manager_calc.c 
b/src/lib/elementary/efl_ui_focus_manager_calc.c
index ea27522efa..37b39db15f 100644
--- a/src/lib/elementary/efl_ui_focus_manager_calc.c
+++ b/src/lib/elementary/efl_ui_focus_manager_calc.c
@@ -1495,7 +1495,8 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_move(Eo 
*obj EINA_UNUSED, Efl_Ui
                   if (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);
 
                   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)
           {
              efl_ui_focus_manager_focus_set(obj, candidate);
-             if (direction == ELM_FOCUS_PREVIOUS)
+             if (direction == ELM_FOCUS_PREVIOUS && candidate)
                _followup_previous_direction(obj);
           }
      }

-- 


Reply via email to