aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_wl2/ecore_wl2_input.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-05-12 12:08:32 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-05-12 12:08:25 -0400
commit44f22a250e34a9d82758beeb642070cf089c09dd (patch)
tree4a03a25d4737f1174d0d8e3d825801a8cbaa0f17 /src/lib/ecore_wl2/ecore_wl2_input.c
parentecore-wl2: store names for inputs and add api for retrieving name (diff)
downloadefl-44f22a250e34a9d82758beeb642070cf089c09dd.tar.gz
ecore-wl2: split data offers into selection and drag
these are distinct objects and can coexist simultaneously; a drag source should not overwrite an existing selection source @fix
Diffstat (limited to 'src/lib/ecore_wl2/ecore_wl2_input.c')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_input.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c
index 29b53a9f4d..56b2c9b2d2 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -1431,7 +1431,8 @@ _ecore_wl2_input_add(Ecore_Wl2_Display *display, unsigned int id, unsigned int v
input->repeat.delay = 0.4;
input->repeat.enabled = EINA_TRUE;
- wl_array_init(&input->data.types);
+ wl_array_init(&input->data.selection.types);
+ wl_array_init(&input->data.drag.types);
/* setup cursor size and theme */
_ecore_wl2_input_cursor_setup(input);
@@ -1487,17 +1488,27 @@ _ecore_wl2_input_del(Ecore_Wl2_Input *input)
if (input->cursor.name) eina_stringshare_del(input->cursor.name);
- if (input->data.types.data)
+ if (input->data.selection.types.data)
{
char **t;
- wl_array_for_each(t, &input->data.types)
+ wl_array_for_each(t, &input->data.selection.types)
free(*t);
- wl_array_release(&input->data.types);
+ wl_array_release(&input->data.selection.types);
+ }
+ if (input->data.drag.types.data)
+ {
+ char **t;
+
+ wl_array_for_each(t, &input->data.drag.types)
+ free(*t);
+
+ wl_array_release(&input->data.drag.types);
}
- if (input->data.source) wl_data_source_destroy(input->data.source);
+ if (input->data.selection.source) wl_data_source_destroy(input->data.selection.source);
+ if (input->data.drag.source) wl_data_source_destroy(input->data.drag.source);
if (input->drag) _ecore_wl2_offer_unref(input->drag);
if (input->selection) _ecore_wl2_offer_unref(input->selection);
if (input->data.device) wl_data_device_destroy(input->data.device);