forked from enlightenment/efl
elm - dnd - fix drop target del to not nuke handler all the time
this broke dnd if u have multiple drop targets in a window... keep the functions there if we still have drop targets... especially in x11. @fix
This commit is contained in:
parent
894c1b34b3
commit
c3c903b9cc
|
@ -4999,6 +4999,7 @@ _efl_ui_selection_manager_drop_target_del(Eo *obj EINA_UNUSED, Efl_Ui_Selection_
|
||||||
{
|
{
|
||||||
Sel_Manager_Dropable *dropable = NULL;
|
Sel_Manager_Dropable *dropable = NULL;
|
||||||
Sel_Manager_Seat_Selection *seat_sel;
|
Sel_Manager_Seat_Selection *seat_sel;
|
||||||
|
Eina_Bool remove_handler = EINA_FALSE;
|
||||||
|
|
||||||
dropable = efl_key_data_get(target_obj, "__elm_dropable");
|
dropable = efl_key_data_get(target_obj, "__elm_dropable");
|
||||||
if (dropable)
|
if (dropable)
|
||||||
|
@ -5040,15 +5041,22 @@ _efl_ui_selection_manager_drop_target_del(Eo *obj EINA_UNUSED, Efl_Ui_Selection_
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!have_drop_list) ecore_x_dnd_aware_set(xwin, EINA_FALSE);
|
if (!have_drop_list)
|
||||||
|
{
|
||||||
|
ecore_x_dnd_aware_set(xwin, EINA_FALSE);
|
||||||
|
remove_handler = EINA_TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
if (remove_handler)
|
||||||
|
{
|
||||||
seat_sel = _sel_manager_seat_selection_init(pd, seat);
|
seat_sel = _sel_manager_seat_selection_init(pd, seat);
|
||||||
ELM_SAFE_FREE(seat_sel->pos_handler, ecore_event_handler_del);
|
ELM_SAFE_FREE(seat_sel->pos_handler, ecore_event_handler_del);
|
||||||
ELM_SAFE_FREE(seat_sel->drop_handler, ecore_event_handler_del);
|
ELM_SAFE_FREE(seat_sel->drop_handler, ecore_event_handler_del);
|
||||||
ELM_SAFE_FREE(seat_sel->enter_handler, ecore_event_handler_del);
|
ELM_SAFE_FREE(seat_sel->enter_handler, ecore_event_handler_del);
|
||||||
ELM_SAFE_FREE(seat_sel->leave_handler, ecore_event_handler_del);
|
ELM_SAFE_FREE(seat_sel->leave_handler, ecore_event_handler_del);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_efl_ui_selection_manager_container_drop_item_add(Eo *obj, Efl_Ui_Selection_Manager_Data *pd,
|
_efl_ui_selection_manager_container_drop_item_add(Eo *obj, Efl_Ui_Selection_Manager_Data *pd,
|
||||||
|
|
Loading…
Reference in New Issue