diff options
author | Mike Blumenkrantz <zmike@osg.samsung.com> | 2016-04-22 11:28:52 -0400 |
---|---|---|
committer | Mike Blumenkrantz <zmike@osg.samsung.com> | 2016-04-22 11:32:08 -0400 |
commit | 7da4d8a4ae40354b5922f9c08e7b8aebd4ae2edb (patch) | |
tree | a9c01ea9c2a2778591b2c276926462984bb121f3 | |
parent | 262ac552874b06dd077742e6c8a9f61ba3e8d35e (diff) | |
download | efl-7da4d8a4ae40354b5922f9c08e7b8aebd4ae2edb.tar.gz |
ecore-wl2: isolate regular selection requests from dnd-specific code
fix T3455
-rw-r--r-- | src/lib/ecore_wl2/ecore_wl2_dnd.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c b/src/lib/ecore_wl2/ecore_wl2_dnd.c index 5aea3b0a3f..4762621c1c 100644 --- a/src/lib/ecore_wl2/ecore_wl2_dnd.c +++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c @@ -151,7 +151,8 @@ data_source_event_emit(Ecore_Wl2_Input *input, int event) ev->source = input->focus.keyboard->id; if (!ev->win) ev->win = ev->source; - ev->action = input->drag.source->dnd_action; + if (input->drag.source) + ev->action = input->drag.source->dnd_action; ecore_event_add(event, ev, NULL, NULL); } @@ -161,9 +162,10 @@ data_source_cancelled(void *data, struct wl_data_source *source) { Ecore_Wl2_Input *input = data; + if (input->drag.source) + input->drag.source->dnd_action = 0; if (input->data.source == source) input->data.source = NULL; wl_data_source_destroy(source); - input->drag.source->dnd_action = 0; data_source_event_emit(input, ECORE_WL2_EVENT_DATA_SOURCE_END); } @@ -189,7 +191,8 @@ data_source_action(void *data, struct wl_data_source *source EINA_UNUSED, uint32 { Ecore_Wl2_Input *input = data; - input->drag.source->dnd_action = dnd_action; + if (input->drag.source) + input->drag.source->dnd_action = dnd_action; data_source_event_emit(input, ECORE_WL2_EVENT_DATA_SOURCE_ACTION); } @@ -231,9 +234,12 @@ _selection_data_read(void *data, Ecore_Fd_Handler *fdh) if (len <= 0) { - if (source->input->display->wl.data_device_manager_version >= - WL_DATA_OFFER_FINISH_SINCE_VERSION) - wl_data_offer_finish(source->offer); + if (source->input->drag.source) + { + if (source->input->display->wl.data_device_manager_version >= + 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); |