diff options
author | Thiep Ha <thiepha@gmail.com> | 2015-12-17 18:13:17 +0000 |
---|---|---|
committer | Thiep Ha <thiepha@gmail.com> | 2015-12-17 18:13:17 +0000 |
commit | 6c13b8db9a7dbbd417caf06d9f855986d815d075 (patch) | |
tree | b09d2492652e98de2cbc7eb292162ae0a86de3ca | |
parent | 893dc792d163b7ad10ed21d71584f20f1afbd7bd (diff) | |
download | elementary-6c13b8db9a7dbbd417caf06d9f855986d815d075.tar.gz |
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).
-rw-r--r-- | src/lib/elm_cnp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c index f1d0fb70c..411a645b7 100644 --- a/src/lib/elm_cnp.c +++ b/src/lib/elm_cnp.c @@ -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, |