forked from enlightenment/efl
efl_ui_focus_manager/calc: handle redirect setting if no previous redirect set
Summary: use same pointer for conditional to improve readability, avoid passing null to efl_ui_focus_manager_reset_history() which cannot be passed null @fix Depends on D8952 Reviewers: bu5hm4n Reviewed By: bu5hm4n Subscribers: bu5hm4n, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8953
This commit is contained in:
parent
9c2547db0c
commit
0dc166adbd
|
@ -821,15 +821,16 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_redirect_set(Eo *obj, Efl_Ui_Foc
|
|||
|
||||
old_manager = pd->redirect;
|
||||
|
||||
if (pd->redirect)
|
||||
efl_event_callback_del(pd->redirect, EFL_EVENT_DEL, _redirect_del, obj);
|
||||
if (old_manager)
|
||||
efl_event_callback_del(old_manager, EFL_EVENT_DEL, _redirect_del, obj);
|
||||
|
||||
pd->redirect = redirect;
|
||||
|
||||
if (pd->redirect)
|
||||
efl_event_callback_add(pd->redirect, EFL_EVENT_DEL, _redirect_del, obj);
|
||||
|
||||
efl_ui_focus_manager_reset_history(old_manager);
|
||||
if (old_manager)
|
||||
efl_ui_focus_manager_reset_history(old_manager);
|
||||
|
||||
//adjust focus property of the most upper element
|
||||
if (_focus_manager_active_get(obj))
|
||||
|
|
Loading…
Reference in New Issue