elm_entry: fix focus on text selection
authorAndrii Kroitor <an.kroitor@samsung.com>
Thu, 19 Mar 2015 08:43:02 +0000 (17:43 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Thu, 19 Mar 2015 08:43:04 +0000 (17:43 +0900)
Summary:
Setting focus to entry object when text is being selected

@fix

Test Plan:
1. open "elementary_test entry3"
2. click on the big entry
3. mouse down on singleline entry to start selection
4. move mouse out of window
5. mouse up. text in that entry seems to be selected
6. press del or type any text

expected result: selected text in singleline entry is deleted/replaced
result without this patch: singleline entry is not focused and all edit actions are affecting the big one

Reviewers: cedric, Hermet, seoz

Subscribers: poornima.srinivasan, subodh6129, raster, reutskiy.v.v, herdsman

Differential Revision: https://phab.enlightenment.org/D1476

src/lib/elm_entry.c

index 615bc2d..8c664e5 100644 (file)
@@ -1975,6 +1975,7 @@ _entry_selection_start_signal_cb(void *data,
    if (txt && top && (elm_win_window_id_get(top)))
      elm_cnp_selection_set(data, ELM_SEL_TYPE_PRIMARY,
                            ELM_SEL_FORMAT_MARKUP, txt, strlen(txt));
+   elm_object_focus_set(data, EINA_TRUE);
 }
 
 static void