Created
August 8, 2018 20:07
-
-
Save marcelhollerbach/b263cadf4f44745a9226d5abeafd5d0e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
Node *node; | |
node = eina_hash_find(pd->node_hash, &child); | |
if (!node) return; | |
F_DBG("Manager: %p unregister %p", obj, child); | |
if (eina_list_last_data_get(pd->focus_stack) == node) | |
{ | |
if (!efl_invalidated_get(pd->root->focusable)) | |
{ | |
Node *n = NULL; | |
// if there is no redirect manager, then try to recover the focus property to a different element | |
if (!pd->redirect) | |
{ | |
n = eina_list_nth(pd->focus_stack, eina_list_count(pd->focus_stack) - 2); | |
if (!n) | |
n = _request_subchild_except(pd->root, node); | |
if (n) | |
efl_ui_focus_manager_focus_set(obj, n->focusable); | |
} | |
// if there is a redirect manager, then remove the flag from the child | |
if (!n) | |
{ | |
Efl_Ui_Focus_Object *top; | |
efl_ui_focus_object_focus_set(child, EINA_FALSE); | |
top = elm_widget_top_get(child); | |
if (!evas_focus_get(evas_object_evas_get(top))) | |
evas_object_focus_set(top, EINA_TRUE); | |
} | |
} | |
} | |
eina_hash_del_by_key(pd->node_hash, &child); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment