discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7da4d8a4ae40354b5922f9c08e7b8aebd4ae2edb

commit 7da4d8a4ae40354b5922f9c08e7b8aebd4ae2edb
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Fri Apr 22 11:28:52 2016 -0400

    ecore-wl2: isolate regular selection requests from dnd-specific code
    
    fix T3455
---
 src/lib/ecore_wl2/ecore_wl2_dnd.c | 18 ++++++++++++------
 1 file 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 5aea3b0..4762621 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);

-- 


Reply via email to