forked from enlightenment/efl
elementary/elm_win : Elementary's focus control should be started
after the canvas gets focus. There can be a case that the canvas doesn't get focus when elm_win is shown. SVN revision: 63240
This commit is contained in:
parent
8cd01e8068
commit
52b792ce75
|
@ -26,6 +26,7 @@ struct _Elm_Win
|
||||||
} shot;
|
} shot;
|
||||||
Eina_Bool autodel : 1;
|
Eina_Bool autodel : 1;
|
||||||
int *autodel_clear, rot;
|
int *autodel_clear, rot;
|
||||||
|
int show_count;
|
||||||
struct {
|
struct {
|
||||||
int x, y;
|
int x, y;
|
||||||
} screen;
|
} screen;
|
||||||
|
@ -306,7 +307,12 @@ _elm_win_focus_in(Ecore_Evas *ee)
|
||||||
if (!obj) return;
|
if (!obj) return;
|
||||||
win = elm_widget_data_get(obj);
|
win = elm_widget_data_get(obj);
|
||||||
if (!win) return;
|
if (!win) return;
|
||||||
if (!elm_widget_focus_get(win->win_obj))
|
if (win->show_count == 1)
|
||||||
|
{
|
||||||
|
elm_object_focus_set(win->win_obj, EINA_TRUE);
|
||||||
|
win->show_count++;
|
||||||
|
}
|
||||||
|
else
|
||||||
elm_widget_focus_restore(win->win_obj);
|
elm_widget_focus_restore(win->win_obj);
|
||||||
evas_object_smart_callback_call(win->win_obj, SIG_FOCUS_IN, NULL);
|
evas_object_smart_callback_call(win->win_obj, SIG_FOCUS_IN, NULL);
|
||||||
win->focus_highlight.cur.visible = EINA_TRUE;
|
win->focus_highlight.cur.visible = EINA_TRUE;
|
||||||
|
@ -433,11 +439,11 @@ _deferred_ecore_evas_free(void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_elm_win_obj_callback_show(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
|
_elm_win_obj_callback_show(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
{
|
{
|
||||||
Elm_Win *win = data;
|
Elm_Win *win = data;
|
||||||
|
|
||||||
elm_object_focus_set(obj, EINA_TRUE);
|
if (!win->show_count) win->show_count++;
|
||||||
if (win->shot.info) _shot_handle(win);
|
if (win->shot.info) _shot_handle(win);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue