elementary entry: update focus state when editable state is changed
authorYoungbok Shin <youngb.shin@samsung.com>
Fri, 9 Jun 2017 05:19:57 +0000 (14:19 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Fri, 9 Jun 2017 05:28:40 +0000 (14:28 +0900)
commit22ed5794307eaf9a2b280adc6a1c7377fefd74ac
treee5e8ab689b3ff1e21af2bda9a24ffad07a22ee97
parent5cac1baf1faf4b0fe56b95630648371f2c29dc3b
elementary entry: update focus state when editable state is changed

Summary:
To recieve keyboard events, the entry_edje should have Evas focus.
But, if a non editable Entry widget takes focus, it can't recieve
keyboard events even if it becomes editable after taking focus.
So, elm_entry_editable_set() function should update Entry's focus state.
@fix

Test Plan:
The code of elementary_test - entry is modified to test this issue.
Please, check the issue with the following steps.

1. Run "elementary_test entry"
2. Click "Unfocus" button to make entry to "unfocused" state.
3. Click "Edit" button to make entry to non-editable mode.
4. Click "Focus" button to make entry to "focused" state.
5. Click "Edit" button to make entry to editable mode.
6. See a cursor is blinking in entry.
   => But, you can't edit text without this patch.

Reviewers: raster, herdsman, cedric, jpeg, woohyun

Differential Revision: https://phab.enlightenment.org/D4858
src/bin/elementary/test_entry.c
src/lib/elementary/elm_entry.c