From b50d231ab8f8c6162afb529c79a4c5875deeec17 Mon Sep 17 00:00:00 2001 From: WooHyun Jung Date: Mon, 21 Feb 2011 20:04:40 +0900 Subject: [PATCH] [edje_entry] key_down_cb is modified (Backspace Bug) : r.57199 --- src/lib/edje_entry.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/lib/edje_entry.c b/src/lib/edje_entry.c index 30e90e9..87e7138 100644 --- a/src/lib/edje_entry.c +++ b/src/lib/edje_entry.c @@ -1319,7 +1319,7 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v Eina_Bool control, alt, shift; Eina_Bool multiline; Eina_Bool cursor_changed; - Evas_Textblock_Cursor *tc; + int old_cur_pos; if (!rp) return; en = rp->entry_data; if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) || @@ -1339,8 +1339,7 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v } #endif /* HAVE_ECORE_IMF */ - tc = evas_object_textblock_cursor_new(rp->object); - evas_textblock_cursor_copy(en->cursor, tc); + old_cur_pos = evas_textblock_cursor_pos_get(en->cursor); control = evas_key_modifier_is_set(ev->modifiers, "Control"); alt = evas_key_modifier_is_set(ev->modifiers, "Alt"); @@ -1708,11 +1707,9 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v _caps_mode_check(en); } } - - if ((evas_textblock_cursor_compare(tc, en->cursor)) && (!cursor_changed)) - _edje_emit(ed, "cursor,changed", rp->part->name); - evas_textblock_cursor_free(tc); - + if ((old_cur_pos != evas_textblock_cursor_pos_get(en->cursor)) && (!cursor_changed)) + _edje_emit(ed, "cursor,changed", rp->part->name); + #ifdef HAVE_ECORE_IMF if (en->imf_context) { -- 2.7.4