summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2020-09-30 13:59:27 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-09-30 13:59:27 +0100
commitde5ac3287002f21fb13f97ba635f6962664e3ebc (patch)
tree4a5dd02c4c35e1da4c0f7381865aad22898100d0 /src/modules
parent3d351b98c24e617b13f120605dd8d6c9c7892e4e (diff)
Windows: fix copy'n paste
Summary: fix seat id and clean cnp data when needed Test Plan: Ctrl-c and Ctrl-V (elm-->app, app--> elm elm-->elm) Reviewers: jptiz, walac, cochisecesar, bu5hm4n, felipealmeida, raster Reviewed By: felipealmeida, raster Subscribers: netstar, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12166
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/ecore_evas/engines/win32/ecore_evas_win32.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c
index 638d4e74f7..debb7f263c 100644
--- a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c
+++ b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c
@@ -1219,7 +1219,7 @@ _delivery(void *data, const Eina_Value value EINA_UNUSED, const Eina_Future *dea
1219 } 1219 }
1220 if (mime_type) 1220 if (mime_type)
1221 { 1221 {
1222 edata->clipboard.delivery(ee, 0, ECORE_EVAS_SELECTION_BUFFER_COPY_AND_PASTE_BUFFER, mime_type, &slice); 1222 edata->clipboard.delivery(ee, 1, ECORE_EVAS_SELECTION_BUFFER_COPY_AND_PASTE_BUFFER, mime_type, &slice);
1223 EINA_SAFETY_ON_FALSE_GOTO(ecore_win32_clipboard_set((Ecore_Win32_Window *)ee->prop.window, slice.mem, slice.len, mime_type), end); 1223 EINA_SAFETY_ON_FALSE_GOTO(ecore_win32_clipboard_set((Ecore_Win32_Window *)ee->prop.window, slice.mem, slice.len, mime_type), end);
1224 } 1224 }
1225 else 1225 else
@@ -1234,18 +1234,21 @@ end:
1234static Eina_Bool 1234static Eina_Bool
1235_ecore_evas_win32_selection_claim(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection, Eina_Array *available_types, Ecore_Evas_Selection_Internal_Delivery delivery, Ecore_Evas_Selection_Internal_Cancel cancel) 1235_ecore_evas_win32_selection_claim(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection, Eina_Array *available_types, Ecore_Evas_Selection_Internal_Delivery delivery, Ecore_Evas_Selection_Internal_Cancel cancel)
1236{ 1236{
1237 Ecore_Evas_Engine_Data_Win32 *edata = ee->engine.data;
1238
1237 if (selection != ECORE_EVAS_SELECTION_BUFFER_COPY_AND_PASTE_BUFFER) 1239 if (selection != ECORE_EVAS_SELECTION_BUFFER_COPY_AND_PASTE_BUFFER)
1238 return EINA_FALSE; 1240 return EINA_FALSE;
1239 1241
1240 if (!delivery && !cancel) 1242 if (!delivery && !cancel)
1241 { 1243 {
1244 edata->clipboard.delivery = NULL;
1245 edata->clipboard.cancel = NULL;
1246 eina_array_clean(edata->clipboard.available_types);
1242 ecore_win32_clipboard_clear((Ecore_Win32_Window *)ee->prop.window); 1247 ecore_win32_clipboard_clear((Ecore_Win32_Window *)ee->prop.window);
1243 return EINA_TRUE; 1248 return EINA_TRUE;
1244 } 1249 }
1245 else 1250 else
1246 { 1251 {
1247 Ecore_Evas_Engine_Data_Win32 *edata = ee->engine.data;
1248
1249 if (edata->clipboard.cancel) 1252 if (edata->clipboard.cancel)
1250 { 1253 {
1251 edata->clipboard.cancel(ee, seat, selection); 1254 edata->clipboard.cancel(ee, seat, selection);