From 86719f3016e41bf6389dd08d577c02c9921321f5 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sun, 4 May 2014 17:14:18 +1000 Subject: Work around Elm entry hang on exit bug in chat. --- src/extantz/chat.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/extantz/chat.c b/src/extantz/chat.c index ef40d08..d71e8bb 100644 --- a/src/extantz/chat.c +++ b/src/extantz/chat.c @@ -1,6 +1,15 @@ #include "extantz.h" +// TODO - This is to work around a bug in Elm entry, remove it when the bug is fixed. +// The bug is that editable entry widgets cause the app to hang on exit. +void _on_entry_del(void *data, Evas_Object *obj, void *event_info) +{ +// fangWin *me = data; + + elm_entry_editable_set(obj, EINA_FALSE); +} + fangWin *chat_add(globals *ourGlobals) { fangWin *me; @@ -29,18 +38,18 @@ fangWin *chat_add(globals *ourGlobals) eo_unref(en); en = eo_add(ELM_OBJ_ENTRY_CLASS, me->win); + wid = widgetAdd(me); + wid->obj = en; + wid->on_del = _on_entry_del; elm_object_text_set(en, ""); eo_do(en, elm_obj_entry_scrollable_set(EINA_TRUE), -// TODO - Setting editable to TRUE is what hangs up extantz on exit. -// elm_obj_entry_editable_set(EINA_TRUE), - elm_obj_entry_editable_set(EINA_FALSE), + elm_obj_entry_editable_set(EINA_TRUE), evas_obj_size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND), evas_obj_size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL), evas_obj_visibility_set(EINA_TRUE) ); elm_box_pack_end(bx, en); - eo_unref(en); evas_object_show(bx); eo_unref(bx); -- cgit v1.1