elementary : elm_win didn't be focused/unfocused following the focus
state of its ecore_evas. SVN revision: 62235
This commit is contained in:
parent
3a54142ba7
commit
bda792c39a
|
@ -1944,6 +1944,21 @@ elm_widget_focus_steal(Evas_Object *obj)
|
|||
return;
|
||||
}
|
||||
|
||||
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_focus_set(newest, EINA_FALSE);
|
||||
elm_object_focus_set(newest, EINA_TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_widget_activate(Evas_Object *obj)
|
||||
{
|
||||
|
|
|
@ -299,6 +299,22 @@ EAPI Evas_Object *elm_widget_parent_get(const Evas_Object *obj);
|
|||
EAPI Evas_Object *elm_widget_parent2_get(const Evas_Object *obj);
|
||||
EAPI void elm_widget_parent2_set(Evas_Object *obj, Evas_Object *parent);
|
||||
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);
|
||||
|
|
|
@ -306,6 +306,9 @@ _elm_win_focus_in(Ecore_Evas *ee)
|
|||
if (!obj) return;
|
||||
win = elm_widget_data_get(obj);
|
||||
if (!win) return;
|
||||
elm_widget_focus_restore(win->win_obj);
|
||||
if (!elm_object_focus_get(win->win_obj))
|
||||
elm_object_focus_set(win->win_obj, EINA_TRUE);
|
||||
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);
|
||||
|
@ -327,6 +330,7 @@ _elm_win_focus_out(Ecore_Evas *ee)
|
|||
if (!obj) return;
|
||||
win = elm_widget_data_get(obj);
|
||||
if (!win) return;
|
||||
elm_object_focus_set(win->win_obj, EINA_FALSE);
|
||||
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);
|
||||
|
|
Loading…
Reference in New Issue