summaryrefslogtreecommitdiff
path: root/src
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
parentdc70d5cb55a495cb2d50af9f97ec71c67c7a0ee0 (diff)
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')
-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)
1258 /* else if (sd->img_obj) */ 1258 /* else if (sd->img_obj) */
1259 /* { */ 1259 /* { */
1260 /* } */ 1260 /* } */
1261 if (!efl_ui_focus_manager_focus_get(sd->obj) && !efl_ui_focus_manager_redirect_get(sd->obj))
1262 {
1263 Efl_Ui_Focus_Object *child;
1264
1265 child = efl_ui_focus_manager_request_subchild(sd->obj, sd->obj);
1266
1267 if (child)
1268 efl_ui_focus_manager_focus_set(sd->obj, sd->obj);
1269 else
1270 evas_object_focus_set(sd->obj, EINA_TRUE);
1271 }
1261} 1272}
1262 1273
1263static void 1274static void
@@ -5105,8 +5116,6 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Efl_U
5105 efl_constructor(efl_super(obj, MY_CLASS)); 5116 efl_constructor(efl_super(obj, MY_CLASS));
5106 evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks); 5117 evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
5107 5118
5108 evas_object_focus_set(obj, EINA_TRUE);
5109
5110 if (getenv("ELM_FIRST_FRAME")) 5119 if (getenv("ELM_FIRST_FRAME"))
5111 evas_event_callback_add(ecore_evas_get(tmp_sd.ee), EVAS_CALLBACK_RENDER_POST, 5120 evas_event_callback_add(ecore_evas_get(tmp_sd.ee), EVAS_CALLBACK_RENDER_POST,
5112 _elm_win_first_frame_do, getenv("ELM_FIRST_FRAME")); 5121 _elm_win_first_frame_do, getenv("ELM_FIRST_FRAME"));