summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiep Ha <thiepha@gmail.com>2018-01-05 09:27:02 +0900
committerThiep Ha <thiepha@gmail.com>2018-01-05 09:27:02 +0900
commit03faf153af6633df4181c3a4fa631543b679d8d1 (patch)
treec870e970a7d5f1290cf6259e333a66456053faa4
parent4c7f0fa5693a7073ff210bcea7409a5b27dcdbb2 (diff)
downloadefl-03faf153af6633df4181c3a4fa631543b679d8d1.tar.gz
correct returned data, remove unused event
-rw-r--r--src/lib/elementary/efl_selection_manager.c11
-rw-r--r--src/lib/elementary/efl_ui_dnd_container.eo4
2 files changed, 9 insertions, 6 deletions
diff --git a/src/lib/elementary/efl_selection_manager.c b/src/lib/elementary/efl_selection_manager.c
index c701b0f451..c109fe947a 100644
--- a/src/lib/elementary/efl_selection_manager.c
+++ b/src/lib/elementary/efl_selection_manager.c
@@ -989,7 +989,8 @@ _efl_sel_manager_x11_selection_notify(void *udata, int type EINA_UNUSED, void *e
Eina_Position2D pos, posret;
evas_object_geometry_get(dropable->obj, &pos.x, &pos.y, NULL, NULL);
//get item
- pos = EINA_POSITION2D(seat_sel->saved_types->pos.x + pos.x, seat_sel->saved_types->pos.y + pos.y);
+ pos = EINA_POSITION2D(seat_sel->saved_types->pos.x + pos.x,
+ seat_sel->saved_types->pos.y + pos.y);
ERR("x, y: %d %d, x, y0: %d %d", seat_sel->saved_types->pos.x, seat_sel->saved_types->pos.y, pos.x, pos.y);
Efl_Object *it = NULL;
if (dropable->item_func)
@@ -1098,6 +1099,7 @@ _x11_general_converter(char *target EINA_UNUSED, void *data, int size EINA_UNUSE
//Efl_Selection_Manager_Data *pd = *(Efl_Selection_Manager_Data **)data;
//Sel_Manager_Seat_Selection *seat_sel = _sel_manager_seat_selection_get(pd, 1);
+ sel_debug("general converter");
Sel_Manager_Selection *sel = *(Sel_Manager_Selection **)data;
//if (_get_selection_type(data, seat_sel) == EFL_SELECTION_FORMAT_NONE)
if (sel->format == EFL_SELECTION_FORMAT_NONE)
@@ -1116,7 +1118,11 @@ _x11_general_converter(char *target EINA_UNUSED, void *data, int size EINA_UNUSE
{
if (sel->data.mem)
{
- if (data_ret) *data_ret = strdup(sel->data.mem);
+ if (data_ret)
+ {
+ *data_ret = strdup(sel->data.mem);
+ ((char **)(data_ret))[0][sel->data.len] = 0;
+ }
if (size_ret) *size_ret = strlen(sel->data.mem);
}
else
@@ -1136,6 +1142,7 @@ _x11_targets_converter(char *target EINA_UNUSED, void *data, int size EINA_UNUSE
Sel_Manager_Selection *sel;
Efl_Selection_Format seltype;
+ sel_debug("target converter");
if (!data_ret) return EINA_FALSE;
//Efl_Selection_Manager_Data *pd = *(Efl_Selection_Manager_Data **)data;
diff --git a/src/lib/elementary/efl_ui_dnd_container.eo b/src/lib/elementary/efl_ui_dnd_container.eo
index a5faed6373..abafe55661 100644
--- a/src/lib/elementary/efl_ui_dnd_container.eo
+++ b/src/lib/elementary/efl_ui_dnd_container.eo
@@ -1,7 +1,6 @@
import efl_ui_dnd_types;
mixin Efl.Ui.Dnd.Container {
- //data: null;
methods {
@property drag_delay_time {
[[The time since mouse down happens to drag starts.]]
@@ -48,7 +47,4 @@ mixin Efl.Ui.Dnd.Container {
}
}
}
- events {
- drag,item,container,drop; [[called when the selected data is 'dropped' on container]]
- }
}