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
This commit is contained in:
Mike Blumenkrantz 2016-04-25 16:14:02 -04:00
parent 588b133c19
commit 49302010f4
1 changed files with 4 additions and 3 deletions

View File

@ -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;