efl_ui_focus_manager_calc: correctly flag elements used
authorMarcel Hollerbach <mail@marcel-hollerbach.de>
Sat, 18 Apr 2020 08:46:37 +0000 (10:46 +0200)
committerJongmin Lee <jm105.lee@samsung.com>
Tue, 5 May 2020 21:25:48 +0000 (06:25 +0900)
when setting the relation from two widgets a<->b a is used as well as b.
This now correctly sets these flags.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11730

src/lib/elementary/efl_ui_focus_manager_calc.c

index dffef2a8d71a94cc7ee367852547bf71ad38761f..5e77c664508d0eae78c3bdcd5267d66dbc577a27 100644 (file)
@@ -407,6 +407,8 @@ dirty_flush_node(Efl_Ui_Focus_Manager *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Cal
      {
         Efl_Ui_Focus_Direction direction = -1;
         Efl_Ui_Focus_Graph_Calc_Direction_Result *res = NULL;
+        Node *partner;
+        Eina_List *n;
 
         if (i == 0)
           {
@@ -429,6 +431,9 @@ dirty_flush_node(Efl_Ui_Focus_Manager *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Cal
              res = &result.bottom;
           }
 
+       EINA_LIST_FOREACH(res->relation, n, partner)
+         partner->unused = EINA_FALSE;
+
        border_onedirection_set(node, direction, res->relation);
      }