elm_dnd: do not register widgets twice
authorMarcel Hollerbach <mail@marcel-hollerbach.de>
Mon, 18 May 2020 17:04:43 +0000 (19:04 +0200)
committerJongmin Lee <jm105.lee@samsung.com>
Mon, 25 May 2020 21:34:12 +0000 (06:34 +0900)
we have to support none widgets, but we should not register widgets
twice because of that.

Differential Revision: https://phab.enlightenment.org/D11877

src/lib/elementary/elm_dnd.c

index 18ae659..f0d1824 100644 (file)
@@ -182,7 +182,8 @@ 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 (!efl_isa(obj, EFL_UI_WIDGET_CLASS))
+     _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);