summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinJeong Kim <minjjj.kim@samsung.com>2014-07-08 09:45:47 -0400
committerChris Michael <cp.michael@samsung.com>2014-07-08 09:45:47 -0400
commit31cc570828da2bbf9a9d6b3c3382642a3106c033 (patch)
tree7c39b9303e65c88cfa9a22f56b6a710c1cab682a
parent257817fb78bf8d64c949696895277a5187f87c5e (diff)
elm_cnp: Do not request for selection_set when buffer is empty
Summary: When a wayland client requests selection_set, Wayland server doesn't care and doesn't know how long source data is. so, it cannot ignore request for selection_set about empty buffer. therefore to avoid copying empty buffer, it need to check length of buffer before request selection_set. Test Plan: 1. Run "elementray_test -to entry5" with wayland server. 2. Drag text and try to paste. 3. Drag empty area in entry (request for selection_set on empty buffer is rejected) 4. Try to paste (you can see text of step 2). Reviewers: devilhorns, raster, seoz CC: gwanglim Differential Revision: https://phab.enlightenment.org/D1146
-rw-r--r--src/lib/elm_cnp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index fa9a6624f..a9028f450 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -2453,6 +2453,9 @@ _wl_elm_cnp_selection_set(Evas_Object *obj, Elm_Sel_Type selection, Elm_Sel_Form
2453 if ((!selbuf) && (format != ELM_SEL_FORMAT_IMAGE)) 2453 if ((!selbuf) && (format != ELM_SEL_FORMAT_IMAGE))
2454 return elm_object_cnp_selection_clear(obj, selection); 2454 return elm_object_cnp_selection_clear(obj, selection);
2455 2455
2456 if (buflen <= 0)
2457 return EINA_FALSE;
2458
2456 _wl_elm_cnp_init(); 2459 _wl_elm_cnp_init();
2457 2460
2458 win = elm_win_wl_window_get(obj); 2461 win = elm_win_wl_window_get(obj);