summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBowon Ryu <bowon.ryu@samsung.com>2019-05-21 09:30:04 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-05-21 09:30:04 -0400
commitb5a7ee2ae4466e87d0e3a62aa7885ecda9e30aea (patch)
tree3dac596af225c6ab1a7b431faef56d8a65f60c5c /src
parent205e5a5fe81d768dbad8985f10585bb44b453dde (diff)
elm_entry: prevents invalid cursor position updates
Summary: sd->cursor_pos is updated in _entry_cursor_changed_signal_cb. Generally, there is no problem. But in some cases, before the _entry_cursor_changed_signal_cb is called there is a situation in which cursor_pos is updated through _elm_entry_efl_ui_widget_theme_apply. In this case, before _entry_cursor_changed_signal_cb is called, in _elm_entry_efl_ui_widget_theme_apply () cursor_pos = sd->cursor_pos; The wrong cursor_pos is set here. Because it is the value before sd->cursor_pos is updated. This causes an invalid cursor position when entering a key into the entry. This patch prevents sd->cursor_pos from being updated with invalid values. Reviewers: zmike, woohyun Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8923
Diffstat (limited to 'src')
-rw-r--r--src/lib/elementary/elm_entry.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index 207c10368d..37e75245dc 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -925,7 +925,14 @@ _elm_entry_efl_ui_widget_theme_apply(Eo *obj, Elm_Entry_Data *sd)
925 edje_object_part_text_style_user_push(sd->entry_edje, "elm.text", stl_user); 925 edje_object_part_text_style_user_push(sd->entry_edje, "elm.text", stl_user);
926 eina_stringshare_del(stl_user); 926 eina_stringshare_del(stl_user);
927 927
928 cursor_pos = sd->cursor_pos; 928 cursor_pos = edje_object_part_text_cursor_pos_get
929 (sd->entry_edje, "elm.text", EDJE_CURSOR_MAIN);
930
931 if (cursor_pos != sd->cursor_pos)
932 {
933 sd->cursor_pos = cursor_pos;
934 sd->cur_changed = EINA_TRUE;
935 }
929 936
930 elm_object_text_set(obj, t); 937 elm_object_text_set(obj, t);
931 eina_stringshare_del(t); 938 eina_stringshare_del(t);