elm_object_focus_get_set_next: change from focused callback to ecore_evas_focus_set 29/238929/1
authorYeongjong Lee <yj34.lee@samsung.com>
Mon, 20 Jul 2020 09:50:08 +0000 (18:50 +0900)
committerYeongjong Lee <yj34.lee@samsung.com>
Mon, 20 Jul 2020 09:50:11 +0000 (18:50 +0900)
It calls `ecore_evas_focus_set` to ensure win get focus.

Change-Id: If63712065f3537e152a4e66cedfc58f4af64dbc4

TC/elementary/elm_object/utc_elm_object_focus_get_set_next.c

index 6370f7ee108787a5db9f096fe6582c541893154c..7cab1d65509113ef48e020f297470d8eea4f9f26 100644 (file)
@@ -5,12 +5,6 @@
 
 static Evas_Object *main_win = NULL;
 
-static void
-_win_focused_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
-{
-   ecore_main_loop_quit();
-}
-
 /**
  * @addtogroup elm_object
  * @{
@@ -27,10 +21,9 @@ setup(void)
    UTC_ELM_INIT();
    elm_config_accel_preference_set("3d");
    main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
-   evas_object_smart_callback_add(main_win, "focused", _win_focused_cb, NULL);
 
+   ecore_evas_focus_set(ecore_evas_ecore_evas_get(evas_object_evas_get(main_win)), EINA_TRUE);
    evas_object_show(main_win);
-   ecore_main_loop_begin();
 }
 
 static void