aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2016-09-22 09:26:02 +0200
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2016-09-23 11:14:41 +0200
commit7d6fd1052353c113340fd9f7891cf9d301bf1e73 (patch)
tree678fc05a48df6381d7fd6f73603ff97b587d19df
parenttext/entry: add more key controls for os x (diff)
downloadefl-7d6fd1052353c113340fd9f7891cf9d301bf1e73.tar.gz
ecore_wl2: save action of data source in seperated field
the drag.source is only available if the drag is happing inside the same client. So for the case there are two efl apps (A,B) , where A started the dnd and the B is currently entered by the dnd, then A has the data source, and B has the offer, if B sets a action on the offer A tried to set it on a field which does not exist there, this fixes that. It saves the action to a undepended field.
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_dnd.c10
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_private.h1
2 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c b/src/lib/ecore_wl2/ecore_wl2_dnd.c
index 628d25a71e..74299f3295 100644
--- a/src/lib/ecore_wl2/ecore_wl2_dnd.c
+++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c
@@ -153,8 +153,8 @@ data_source_event_emit(Ecore_Wl2_Input *input, int event)
ev->source = input->focus.keyboard->id;
if (!ev->win) ev->win = ev->source;
- if (input->drag.source)
- ev->action = input->drag.source->dnd_action;
+
+ ev->action = input->data.action;
ecore_event_add(event, ev, NULL, NULL);
}
@@ -164,9 +164,8 @@ 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;
+ input->data.action = WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE;
wl_data_source_destroy(source);
data_source_event_emit(input, ECORE_WL2_EVENT_DATA_SOURCE_END);
}
@@ -193,8 +192,7 @@ data_source_action(void *data, struct wl_data_source *source EINA_UNUSED, uint32
{
Ecore_Wl2_Input *input = data;
- if (input->drag.source)
- input->drag.source->dnd_action = dnd_action;
+ input->data.action = dnd_action;
data_source_event_emit(input, ECORE_WL2_EVENT_DATA_SOURCE_ACTION);
}
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h
index 59f63fce37..c15c6815da 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -345,6 +345,7 @@ struct _Ecore_Wl2_Input
struct wl_data_device *device;
struct wl_data_source *source;
struct wl_array types;
+ uint32_t action;
} data;
struct