summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2020-04-08 22:19:11 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-04-09 10:24:02 +0200
commitcdd9bb7fb5f1966f7f8b7428d922bc8eb2fe18d7 (patch)
treec5935309aeb93be1af55217871f392f76b0f0f2b
parentdcd88ab233890caae4a4b2412724e37396411994 (diff)
efl_ui_focus_layer: correctly dismantle redirect chaindevs/bu5hm4n/focus_fixes
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
-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;