summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiep Ha <thiepha@gmail.com>2015-12-17 18:13:17 +0000
committerThiep Ha <thiepha@gmail.com>2015-12-17 18:38:35 +0000
commita470e464afca3f2d9568d6c5318b86158f83ae47 (patch)
tree51184212f251c4745a0b910079172081a5b141b7
parent90cc853ae6ff82e36422ba4240357a06a7bbce38 (diff)
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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index 070105746..d5c72894e 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
2410 2410
2411 win = elm_win_wl_window_get(obj); 2411 win = elm_win_wl_window_get(obj);
2412 2412
2413 if (sel->loss_cb) sel->loss_cb(sel->loss_data, selection); 2413 if ((sel->widget != obj) && sel->loss_cb)
2414 sel->loss_cb(sel->loss_data, selection);
2414 2415
2415 if (sel->widget) 2416 if (sel->widget)
2416 evas_object_event_callback_del_full(sel->widget, 2417 evas_object_event_callback_del_full(sel->widget,