thiep pushed a commit to branch elementary-1.16.

commit a470e464afca3f2d9568d6c5318b86158f83ae47
Author: Thiep Ha <>
Date:   Thu Dec 17 18:13:17 2015 +0000

    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).
 src/lib/elm_cnp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index 0701057..d5c7289 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 = elm_win_wl_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)


Reply via email to