diff options
Diffstat (limited to 'src/lib/elementary/elm_dnd.c')
-rw-r--r-- | src/lib/elementary/elm_dnd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/elementary/elm_dnd.c b/src/lib/elementary/elm_dnd.c index bc765fdbb6..891fe4da92 100644 --- a/src/lib/elementary/elm_dnd.c +++ b/src/lib/elementary/elm_dnd.c @@ -103,7 +103,7 @@ _drop_cb(void *data, const Efl_Event *ev) Efl_Ui_Drop_Dropped_Event *event = ev->info; Elm_Drop_Target *target = data; target->action = _string_to_action(event->action); - efl_future_then(ev->object, efl_ui_dnd_drop_data_get(ev->object, _default_seat(ev->object), eina_array_iterator_new(target->mime_types)), + efl_future_then(ev->object, efl_ui_dnd_drop_data_get(elm_widget_is(ev->object) ? ev->object : efl_ui_win_get(ev->object), _default_seat(ev->object), eina_array_iterator_new(target->mime_types)), .success = _deliver_content, .data = target ); @@ -178,7 +178,7 @@ elm_drop_target_add(Evas_Object *obj, Elm_Sel_Format format, target->format = format; efl_event_callback_array_add(obj, drop_target_cb(), target); - + _drop_event_register(obj); //this is ensuring that we are also supporting none widgets if (!target_register) target_register = eina_hash_pointer_new(NULL); eina_hash_list_append(target_register, &obj, target); @@ -223,6 +223,7 @@ elm_drop_target_del(Evas_Object *obj, Elm_Sel_Format format, efl_event_callback_array_del(obj, drop_target_cb(), eina_list_data_get(found)); eina_hash_list_remove(target_register, &obj, target); eina_array_free(target->mime_types); + _drop_event_unregister(obj); //this is ensuring that we are also supporting none widgets free(target); } |