aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary/efl_ui_win.c
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel@osg.samsung.com>2018-02-11 18:04:06 +0000
committerMarcel Hollerbach <marcel@osg.samsung.com>2018-02-11 18:04:06 +0000
commit56beb861e83cbc830c82db7473e0a88461e2e213 (patch)
treefdbf5737c7dd50afc30673a70821936dbbeb5e47 /src/lib/elementary/efl_ui_win.c
parentedje - entry - fix empty item handling (diff)
downloadefl-56beb861e83cbc830c82db7473e0a88461e2e213.tar.gz
efl_ui_win: move inital focus set to focus_in handler
it seems that focus changes to FOCUS=FALSE are causing autodel windows to kill themself, so we only set the focus on the window if the window manager calls focus in AND we dont have anything to focus and nothing is focused yet.
Diffstat (limited to 'src/lib/elementary/efl_ui_win.c')
-rw-r--r--src/lib/elementary/efl_ui_win.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index ebc7d8979b..1a8cd6ad93 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -1258,6 +1258,17 @@ _elm_win_focus_in(Ecore_Evas *ee)
/* else if (sd->img_obj) */
/* { */
/* } */
+ if (!efl_ui_focus_manager_focus_get(sd->obj) && !efl_ui_focus_manager_redirect_get(sd->obj))
+ {
+ Efl_Ui_Focus_Object *child;
+
+ child = efl_ui_focus_manager_request_subchild(sd->obj, sd->obj);
+
+ if (child)
+ efl_ui_focus_manager_focus_set(sd->obj, sd->obj);
+ else
+ evas_object_focus_set(sd->obj, EINA_TRUE);
+ }
}
static void
@@ -5105,8 +5116,6 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Efl_U
efl_constructor(efl_super(obj, MY_CLASS));
evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
- evas_object_focus_set(obj, EINA_TRUE);
-
if (getenv("ELM_FIRST_FRAME"))
evas_event_callback_add(ecore_evas_get(tmp_sd.ee), EVAS_CALLBACK_RENDER_POST,
_elm_win_first_frame_do, getenv("ELM_FIRST_FRAME"));