elm_focus: unset newest focus properly on revert focus logic 56/248356/2
authorYeongjong Lee <yj34.lee@samsung.com>
Wed, 25 Nov 2020 23:26:14 +0000 (08:26 +0900)
committerYeongJong Lee <yj34.lee@samsung.com>
Thu, 26 Nov 2020 08:20:13 +0000 (08:20 +0000)
If top win is not focused, newest focus is only set to true without clearing
focus. in this process, there can be multiple focused object.

This patch removes the code to check top win focus state before clearing focus
in _if_focused_revert().

Change-Id: Iea82435f21567cf4d7cd99151b240e71c003e965

src/lib/elementary/efl_ui_widget.c

index 6030923..9ca05ff 100644 (file)
@@ -9515,7 +9515,8 @@ _if_focused_revert(Evas_Object *obj,
                }
              else
                {
-                  elm_object_focus_set(newest, EINA_FALSE);
+                  if (_is_focused(newest))
+                    efl_ui_widget_focused_object_clear(newest);
                   elm_object_focus_set(newest, EINA_TRUE);
                }
           }