forked from enlightenment/efl
From: WooHyun Jung <wh0705.jung@samsung.com>
Subject: RE: [E-devel] One bug in _edje_key_down_cb func (in edje_entry.c) I found one bug in _edje_key_down_cb func (in edje_entry.c) When I input "Backspace" in an entry object, _signal_cursor_chagned_func(in elm_entry.c) is not called. This is because the following code in _edje_key_down_cb func (in edje_entry.c) is not called. if ((evas_textblock_cursor_compare(tc, en->cursor)) && (!cursor_changed)) _edje_emit(ed, "cursor,changed", rp->part->name); Why not called ? Because ~ evas_textblock_cursor_compare(tc, en->cursor) returns 0. (i.e. old cursor and current cursor have the same position information) I think old cursor should keep its position without any updating. But in evas_textblock_cursor_char_delete() func, called by _backsapce func (in edje_entry.c) - old cursor's postion is updated as the current position. SVN revision: 57199
This commit is contained in:
parent
d125dcecb1
commit
4274d39f03
|
@ -1016,7 +1016,7 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v
|
||||||
Eina_Bool control, alt, shift;
|
Eina_Bool control, alt, shift;
|
||||||
Eina_Bool multiline;
|
Eina_Bool multiline;
|
||||||
Eina_Bool cursor_changed;
|
Eina_Bool cursor_changed;
|
||||||
Evas_Textblock_Cursor *tc;
|
int old_cur_pos;
|
||||||
if (!rp) return;
|
if (!rp) return;
|
||||||
en = rp->entry_data;
|
en = rp->entry_data;
|
||||||
if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
|
if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
|
||||||
|
@ -1036,8 +1036,7 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
tc = evas_object_textblock_cursor_new(rp->object);
|
old_cur_pos = evas_textblock_cursor_pos_get(en->cursor);
|
||||||
evas_textblock_cursor_copy(en->cursor, tc);
|
|
||||||
|
|
||||||
control = evas_key_modifier_is_set(ev->modifiers, "Control");
|
control = evas_key_modifier_is_set(ev->modifiers, "Control");
|
||||||
alt = evas_key_modifier_is_set(ev->modifiers, "Alt");
|
alt = evas_key_modifier_is_set(ev->modifiers, "Alt");
|
||||||
|
@ -1343,9 +1342,8 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v
|
||||||
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
|
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((evas_textblock_cursor_compare(tc, en->cursor)) && (!cursor_changed))
|
if ((old_cur_pos != evas_textblock_cursor_pos_get(en->cursor)) && (!cursor_changed))
|
||||||
_edje_emit(ed, "cursor,changed", rp->part->name);
|
_edje_emit(ed, "cursor,changed", rp->part->name);
|
||||||
evas_textblock_cursor_free(tc);
|
|
||||||
|
|
||||||
#ifdef HAVE_ECORE_IMF
|
#ifdef HAVE_ECORE_IMF
|
||||||
if (en->imf_context)
|
if (en->imf_context)
|
||||||
|
|
Loading…
Reference in New Issue