wayland cnp: check selection owner before calling losscb

The selection is cleared by losscb when we set it.
As result, selection is not done.
To avoid it, we should check if the new selection owner
is current selection owner or not and only call losscb
if the new selection owner is not the current one.

Test Plan:
In wayland, select text in entry (e.g double click, ctrl-a).
This commit is contained in:
Thiep Ha 2015-12-17 18:13:17 +00:00
parent 71cdc2f269
commit 435a8bcd24
1 changed files with 2 additions and 1 deletions

View File

@ -2410,7 +2410,8 @@ _wl_elm_cnp_selection_set(Evas_Object *obj, Elm_Sel_Type selection, Elm_Sel_Form
win = _wl_elm_widget_window_get(obj);
if (sel->loss_cb) sel->loss_cb(sel->loss_data, selection);
if ((sel->widget != obj) && sel->loss_cb)
sel->loss_cb(sel->loss_data, selection);
if (sel->widget)
evas_object_event_callback_del_full(sel->widget,