Page MenuHomePhabricator

elm_entry: prevents invalid cursor position updates

Authored by bowonryu on May 20 2019, 4:24 AM.



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.

Diff Detail

rEFL core/efl
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
bowonryu created this revision.May 20 2019, 4:24 AM
bowonryu requested review of this revision.May 20 2019, 4:24 AM
zmike requested changes to this revision.May 20 2019, 6:01 AM
zmike added inline comments.

This else part is a bit confusing to read. Can it be removed?

This revision now requires changes to proceed.May 20 2019, 6:01 AM
bowonryu updated this revision to Diff 22289.May 20 2019, 9:27 PM

The else part was my mistake. I removed it.

zmike accepted this revision.May 21 2019, 6:29 AM


This revision is now accepted and ready to land.May 21 2019, 6:29 AM
This revision was automatically updated to reflect the committed changes.