diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index 2308a9a5c0..ff5314033a 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -129,11 +129,18 @@ typedef struct _Ecore_Wl2_Event_Data_Source_Send int fd; } Ecore_Wl2_Event_Data_Source_Send; +typedef enum +{ + ECORE_WL2_SELECTION_CNP, + ECORE_WL2_SELECTION_DND +} Ecore_Wl2_Selection_Type; + typedef struct _Ecore_Wl2_Event_Selection_Data_Ready { char *data; int len; Eina_Bool done; + Ecore_Wl2_Selection_Type sel_type; } Ecore_Wl2_Event_Selection_Data_Ready; typedef enum diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c b/src/lib/ecore_wl2/ecore_wl2_dnd.c index 2e4765c86d..e9feb129fb 100644 --- a/src/lib/ecore_wl2/ecore_wl2_dnd.c +++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c @@ -232,6 +232,7 @@ _selection_data_read(void *data, Ecore_Fd_Handler *fdh) event = calloc(1, sizeof(Ecore_Wl2_Event_Selection_Data_Ready)); if (!event) return ECORE_CALLBACK_CANCEL; + event->sel_type = source->sel_type; if (len <= 0) { if (source->input->drag.source) @@ -530,6 +531,7 @@ ecore_wl2_dnd_drag_get(Ecore_Wl2_Input *input, const char *type) if (!*t) return EINA_FALSE; + input->drag.source->sel_type = ECORE_WL2_SELECTION_DND; _selection_data_receive(input->drag.source, type); return EINA_TRUE; @@ -639,6 +641,7 @@ ecore_wl2_dnd_selection_get(Ecore_Wl2_Input *input, const char *type) if (!*t) return EINA_FALSE; + input->selection.source->sel_type = ECORE_WL2_SELECTION_CNP; _selection_data_receive(input->selection.source, type); return EINA_TRUE; diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h index f1bd494751..6913edc662 100644 --- a/src/lib/ecore_wl2/ecore_wl2_private.h +++ b/src/lib/ecore_wl2/ecore_wl2_private.h @@ -188,6 +188,7 @@ typedef struct _Ecore_Wl2_Dnd_Source struct wl_array types; uint32_t dnd_action; uint32_t source_actions; + Ecore_Wl2_Selection_Type sel_type; } Ecore_Wl2_Dnd_Source;