devilhorns pushed a commit to branch feature/wayland/multi-output.

http://git.enlightenment.org/core/efl.git/commit/?id=107a504d7bb19b6ea5de008c1d520cdd02597985

commit 107a504d7bb19b6ea5de008c1d520cdd02597985
Author: Marcel Hollerbach <mar...@osg.samsung.com>
Date:   Wed Apr 11 10:33:19 2018 +0200

    efl_ui_focus_manager_root_focus: maintain focus state over state eval
    
    the rect is unregistered and registered again, if it was focused, still
    focus it.
---
 src/lib/elementary/efl_ui_focus_manager_root_focus.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/efl_ui_focus_manager_root_focus.c 
b/src/lib/elementary/efl_ui_focus_manager_root_focus.c
index 3b21fb7729..ad2591bf56 100644
--- a/src/lib/elementary/efl_ui_focus_manager_root_focus.c
+++ b/src/lib/elementary/efl_ui_focus_manager_root_focus.c
@@ -31,10 +31,13 @@ static void
 _state_eval(Eo *obj, Efl_Ui_Focus_Manager_Root_Focus_Data *pd)
 {
    Efl_Ui_Focus_Object *root;
-   Eina_Bool none_logical = EINA_FALSE;
+   Eina_Bool none_logical = EINA_FALSE, focused = EINA_FALSE;
 
    if (pd->rect_registered)
-     efl_ui_focus_manager_calc_unregister(obj, pd->rect);
+     {
+        focused = efl_ui_focus_object_focus_get(pd->rect);
+        efl_ui_focus_manager_calc_unregister(obj, pd->rect);
+     }
 
    root = efl_ui_focus_manager_root_get(obj);
    none_logical = !!efl_ui_focus_manager_request_subchild(obj, root);
@@ -45,6 +48,10 @@ _state_eval(Eo *obj, Efl_Ui_Focus_Manager_Root_Focus_Data 
*pd)
      {
         efl_ui_focus_manager_calc_register(obj, pd->rect, pd->root, NULL);
         pd->rect_registered = EINA_TRUE;
+
+        if (focused)
+          efl_ui_focus_manager_focus_set(obj, pd->rect);
+
      }
 }
 

-- 


Reply via email to