From 49302010f41ae841dd2e41881cf201da8b0efe37 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 25 Apr 2016 16:14:02 -0400 Subject: [PATCH] ecore-wl2: preserve data selection source after receiving the selection this is copied from weston, except all the code which is supposed to be of struct type "offer" has been renamed "source" and then reused in the same way that weston uses "offer" in order to maximize reader confusion deleting the source here is invalid since the selection only changes in the corresponding callback from the wayland interface --- src/lib/ecore_wl2/ecore_wl2_dnd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c b/src/lib/ecore_wl2/ecore_wl2_dnd.c index 4762621..2e4765c 100644 --- a/src/lib/ecore_wl2/ecore_wl2_dnd.c +++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c @@ -240,9 +240,10 @@ _selection_data_read(void *data, Ecore_Fd_Handler *fdh) WL_DATA_OFFER_FINISH_SINCE_VERSION) wl_data_offer_finish(source->offer); } - if (source->input->selection.source == source) - source->input->selection.source = NULL; - _ecore_wl2_dnd_del(source); + close(ecore_main_fd_handler_fd_get(source->fdh)); + ecore_main_fd_handler_del(source->fdh); + source->fdh = NULL; + event->done = EINA_TRUE; event->data = NULL; event->len = 0; -- 2.7.4