summaryrefslogtreecommitdiff
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
parent8afe0a7a6ccee6352d6f67b89a616f189cb0284e (diff)
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
1431 input->repeat.delay = 0.4; 1431 input->repeat.delay = 0.4;
1432 input->repeat.enabled = EINA_TRUE; 1432 input->repeat.enabled = EINA_TRUE;
1433 1433
1434 wl_array_init(&input->data.types); 1434 wl_array_init(&input->data.selection.types);
1435 wl_array_init(&input->data.drag.types);
1435 1436
1436 /* setup cursor size and theme */ 1437 /* setup cursor size and theme */
1437 _ecore_wl2_input_cursor_setup(input); 1438 _ecore_wl2_input_cursor_setup(input);
@@ -1487,17 +1488,27 @@ _ecore_wl2_input_del(Ecore_Wl2_Input *input)
1487 1488
1488 if (input->cursor.name) eina_stringshare_del(input->cursor.name); 1489 if (input->cursor.name) eina_stringshare_del(input->cursor.name);
1489 1490
1490 if (input->data.types.data) 1491 if (input->data.selection.types.data)
1491 { 1492 {
1492 char **t; 1493 char **t;
1493 1494
1494 wl_array_for_each(t, &input->data.types) 1495 wl_array_for_each(t, &input->data.selection.types)
1495 free(*t); 1496 free(*t);
1496 1497
1497 wl_array_release(&input->data.types); 1498 wl_array_release(&input->data.selection.types);
1499 }
1500 if (input->data.drag.types.data)
1501 {
1502 char **t;
1503
1504 wl_array_for_each(t, &input->data.drag.types)
1505 free(*t);
1506
1507 wl_array_release(&input->data.drag.types);
1498 } 1508 }
1499 1509
1500 if (input->data.source) wl_data_source_destroy(input->data.source); 1510 if (input->data.selection.source) wl_data_source_destroy(input->data.selection.source);
1511 if (input->data.drag.source) wl_data_source_destroy(input->data.drag.source);
1501 if (input->drag) _ecore_wl2_offer_unref(input->drag); 1512 if (input->drag) _ecore_wl2_offer_unref(input->drag);
1502 if (input->selection) _ecore_wl2_offer_unref(input->selection); 1513 if (input->selection) _ecore_wl2_offer_unref(input->selection);
1503 if (input->data.device) wl_data_device_destroy(input->data.device); 1514 if (input->data.device) wl_data_device_destroy(input->data.device);