}
EAPI void
+elm_widget_focus_restore(Evas_Object *obj)
+{
+ Evas_Object *newest = NULL;
+ unsigned int newest_focus_order = 0;
+ API_ENTRY return;
+
+ newest = _newest_focus_order_get(obj, &newest_focus_order, EINA_TRUE);
+ if (newest)
+ {
+ elm_object_unfocus(newest);
+ elm_object_focus(newest);
+ }
+}
+
+EAPI void
elm_widget_activate(Evas_Object *obj)
{
API_ENTRY return;
EAPI void elm_widget_focused_object_clear(Evas_Object *obj);
EAPI Evas_Object *elm_widget_parent_get(const Evas_Object *obj);
EAPI void elm_widget_focus_steal(Evas_Object *obj);
+
+/**
+ * @internal
+ *
+ * Restore the focus state of the sub-tree.
+ *
+ * This API will restore the focus state of the sub-tree to the lastest
+ * state. If a sub-tree is unfocused and wants to get back to the lastest
+ * focus state, this API will be helpful.
+ *
+ * @param obj The widget root of sub-tree
+ *
+ * @ingroup Widget
+ */
+EAPI void elm_widget_focus_restore(Evas_Object *obj);
+
EAPI void elm_widget_activate(Evas_Object *obj);
EAPI void elm_widget_change(Evas_Object *obj);
EAPI void elm_widget_disabled_set(Evas_Object *obj, Eina_Bool disabled);
if (!obj) return;
win = elm_widget_data_get(obj);
if (!win) return;
- /*NB: Why two different "focus signals" here ??? */
+ if (!elm_widget_focus_get(win->win_obj))
+ elm_widget_focus_restore(win->win_obj);
evas_object_smart_callback_call(win->win_obj, SIG_FOCUS_IN, NULL);
win->focus_highlight.cur.visible = EINA_TRUE;
_elm_win_focus_highlight_reconfigure_job_start(win);
if (!obj) return;
win = elm_widget_data_get(obj);
if (!win) return;
+ elm_object_unfocus(win->win_obj);
evas_object_smart_callback_call(win->win_obj, SIG_FOCUS_OUT, NULL);
win->focus_highlight.cur.visible = EINA_FALSE;
_elm_win_focus_highlight_reconfigure_job_start(win);