summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-09-01 17:31:06 +0200
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-09-02 20:06:15 +0200
commitab2b9d9a3cfd05d29f9635d41e499985d8a2e1f6 (patch)
treefb717e2f3f4a89b05b5307dfd76b769592bfa7f0
parentb8465450720ebca3e1f9ca5c3e4e72ec1061414e (diff)
downloadefl-ab2b9d9a3cfd05d29f9635d41e499985d8a2e1f6.tar.gz
efl_ui_focus_manager_calc: do not swallow a focus event
if we have been redirecting before, we would have lost that event due to the element here beeing at the top of that focus stack
-rw-r--r--src/lib/elementary/efl_ui_focus_manager_calc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/elementary/efl_ui_focus_manager_calc.c b/src/lib/elementary/efl_ui_focus_manager_calc.c
index 7c5d25cd0b..82e4c86634 100644
--- a/src/lib/elementary/efl_ui_focus_manager_calc.c
+++ b/src/lib/elementary/efl_ui_focus_manager_calc.c
@@ -1193,6 +1193,7 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_focus_set(Eo *obj, Efl_Ui_Focus_
Efl_Ui_Focus_Manager *redirect_manager;
Eo *focusable;
Node_Type type;
+ Eina_Bool was_redirect = EINA_FALSE;
EINA_SAFETY_ON_NULL_RETURN(focus);
@@ -1226,6 +1227,9 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_focus_set(Eo *obj, Efl_Ui_Focus_
//first unset the redirect
efl_ui_focus_manager_redirect_set(obj, NULL);
+
+ //we have been redirecting
+ was_redirect = EINA_TRUE;
}
redirect_manager = node->redirect_manager;
@@ -1239,7 +1243,7 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_focus_set(Eo *obj, Efl_Ui_Focus_
old_focus = eina_list_last_data_get(pd->focus_stack);
//check if this is already at the top
- if (old_focus && old_focus->focusable == focus) return;
+ if (!was_redirect && old_focus && old_focus->focusable == focus) return;
//remove the object from the list and add it again
pd->focus_stack = eina_list_remove(pd->focus_stack, node);