mainview_panel: fix panel focus on click of empty panel.

Summary: @fix T5904

Test Plan:
# Open a Project
# Use the menu option and create 5 empty panels by pressing it 4 times.
# click on a panel in any order and then select files.

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Maniphest Tasks: T5904

Differential Revision: https://phab.enlightenment.org/D5133
This commit is contained in:
Al Poole 2017-08-28 14:03:21 +01:00 committed by Andy Williams
parent d4d8d4fb91
commit 7e173bd2c5
1 changed files with 12 additions and 0 deletions

View File

@ -816,6 +816,14 @@ _edi_mainview_panel_prev_clicked_cb(void *data,
elm_scroller_region_bring_in(scroller, x, y, w, h);
}
static void
_edi_mainview_panel_welcome_focused_cb(void *data,
Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
edi_mainview_panel_focus((Edi_Mainview_Panel *) data);
}
void
edi_mainview_panel_free(Edi_Mainview_Panel *panel)
{
@ -942,6 +950,10 @@ edi_mainview_panel_add(Evas_Object *parent)
evas_object_show(txt);
elm_object_content_set(scroll, txt);
elm_object_focus_allow_set(txt, EINA_TRUE);
evas_object_smart_callback_add(txt, "focused",
_edi_mainview_panel_welcome_focused_cb, panel);
panel->welcome = scroll;
_edi_mainview_panel_show(panel, scroll);
return panel;