devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=26db25b5ff376bcb035cf66deb39f931a133344b
commit 26db25b5ff376bcb035cf66deb39f931a133344b Author: Chris Michael <cp.mich...@samsung.com> Date: Tue Sep 29 12:18:49 2015 -0400 ecore-wl2: Add API function to clear a dnd selection Signed-off-by: Chris Michael <cp.mich...@samsung.com> --- src/lib/ecore_wl2/Ecore_Wl2.h | 3 +++ src/lib/ecore_wl2/ecore_wl2_dnd.c | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index e5895fc..befc393 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -502,6 +502,9 @@ EAPI Eina_Bool ecore_wl2_dnd_selection_set(Ecore_Wl2_Input *input, const char ** /* TODO: doxy */ EAPI Eina_Bool ecore_wl2_dnd_selection_get(Ecore_Wl2_Input *input, const char *type); +/* TODO: doxy */ +EAPI Eina_Bool ecore_wl2_dnd_selection_clear(Ecore_Wl2_Input *input); + /* # ifdef __cplusplus */ /* } */ /* # endif */ diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c b/src/lib/ecore_wl2/ecore_wl2_dnd.c index 59481ae..133ef84 100644 --- a/src/lib/ecore_wl2/ecore_wl2_dnd.c +++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c @@ -384,3 +384,15 @@ ecore_wl2_dnd_selection_get(Ecore_Wl2_Input *input, const char *type) return EINA_TRUE; } + +EAPI Eina_Bool +ecore_wl2_dnd_selection_clear(Ecore_Wl2_Input *input) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(input, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(input->data.device, EINA_FALSE); + + wl_data_device_set_selection(input->data.device, + NULL, input->display->serial); + + return EINA_TRUE; +} --