summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2020-04-14 11:29:25 -0400
committerMike Blumenkrantz <zmike@samsung.com>2020-04-14 11:29:25 -0400
commit6312054181e15bfc45f02c0979cec893b91fd9d4 (patch)
treecb887c3a3b8cc1a9996efb8b8beda485275a1f79
parent2ed854bb925b3da5209a55f5c3b4440db0dbbff6 (diff)
efl_ui_focus_layer: correctly dismantle redirect chain
Summary: when a redirect manager is unset, all focus managers in the chain upper to the set manager must be unset. The code uses redirect manager == NULL as an check for the manager to be active or not. ref D11667 Depends on D11671 Reviewers: zmike Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11672
-rw-r--r--src/lib/elementary/efl_ui_focus_layer.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/elementary/efl_ui_focus_layer.c b/src/lib/elementary/efl_ui_focus_layer.c
index ccbe1d31e8..a183c7e8a3 100644
--- a/src/lib/elementary/efl_ui_focus_layer.c
+++ b/src/lib/elementary/efl_ui_focus_layer.c
@@ -147,7 +147,17 @@ _efl_ui_focus_layer_enable_set(Eo *obj, Efl_Ui_Focus_Layer_Data *pd, Eina_Bool v
147 pd->old_focus = NULL; 147 pd->old_focus = NULL;
148 148
149 if (fallback && efl_ui_focus_manager_redirect_get(pd->registered_manager) == obj) 149 if (fallback && efl_ui_focus_manager_redirect_get(pd->registered_manager) == obj)
150 efl_ui_focus_manager_redirect_set(pd->registered_manager, NULL); 150 {
151 Efl_Ui_Focus_Manager *m = pd->registered_manager;
152
153 while (efl_ui_focus_manager_redirect_get(m))
154 {
155 Efl_Ui_Focus_Manager *old = m;
156
157 m = efl_ui_focus_manager_redirect_get(m);
158 efl_ui_focus_manager_redirect_set(old, NULL);
159 }
160 }
151 161
152 efl_ui_focus_manager_calc_unregister(pd->registered_manager, obj); 162 efl_ui_focus_manager_calc_unregister(pd->registered_manager, obj);
153 pd->registered_manager = NULL; 163 pd->registered_manager = NULL;