From 042a9b5b1697888d696b7238d04ca79085cdc58f Mon Sep 17 00:00:00 2001 From: Taehyub Kim Date: Mon, 18 May 2020 07:56:08 +0000 Subject: [PATCH] ecore_evas_wayland_common: keep the backword compatibility for wayland dnd handler Keep the backword compatibility for wayland ECORE_WL2_EVENT_DATA_SOURCE_END event handler. If we don't use this handler, the dnd is not ended when the drop item is dropped. @fix Reviewed-by: Christopher Michael Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D11846 --- .../engines/wayland/ecore_evas_wayland_common.c | 45 ++++++++++++---------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index 732b82b..1109b7b 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c @@ -3753,26 +3753,31 @@ _ecore_evas_wl_selection_init(Ecore_Evas *ee) { Ecore_Evas_Engine_Wl_Data *wdata = ee->engine.data; - wdata->changed_handler = ecore_event_handler_add(ECORE_WL2_EVENT_SEAT_SELECTION, - _wl_selection_changed, ee); - wdata->send_handler = ecore_event_handler_add(ECORE_WL2_EVENT_DATA_SOURCE_SEND, - _wl_interaction_send, ee); - wdata->offer_handler = ecore_event_handler_add(ECORE_WL2_EVENT_OFFER_DATA_READY, - _wl_selection_receive, ee); - wdata->dnd_leave_handler = ecore_event_handler_add(ECORE_WL2_EVENT_DND_LEAVE, - _wl_selection_dnd_leave, ee); - wdata->dnd_motion_handler = ecore_event_handler_add(ECORE_WL2_EVENT_DND_MOTION, - _wl_selection_dnd_motion, ee); - wdata->dnd_enter_handler = ecore_event_handler_add(ECORE_WL2_EVENT_DND_ENTER, - _wl_selection_dnd_enter, ee); - wdata->dnd_drop_handler = ecore_event_handler_add(ECORE_WL2_EVENT_DND_DROP, - _wl_selection_dnd_drop, ee); - //TIZEN_ONLY(20200508): fix this for compatability of tizen 5.5 - //wdata->dnd_end_handler = ecore_event_handler_add(ECORE_WL2_EVENT_DATA_SOURCE_DROP, - // _wl_selection_dnd_end, ee); - wdata->dnd_end_handler = ecore_event_handler_add(ECORE_WL2_EVENT_DATA_SOURCE_END, - _wl_selection_dnd_end, ee); - // + wdata->changed_handler = + ecore_event_handler_add(ECORE_WL2_EVENT_SEAT_SELECTION, + _wl_selection_changed, ee); + wdata->send_handler = + ecore_event_handler_add(ECORE_WL2_EVENT_DATA_SOURCE_SEND, + _wl_interaction_send, ee); + wdata->offer_handler = + ecore_event_handler_add(ECORE_WL2_EVENT_OFFER_DATA_READY, + _wl_selection_receive, ee); + wdata->dnd_leave_handler = + ecore_event_handler_add(ECORE_WL2_EVENT_DND_LEAVE, + _wl_selection_dnd_leave, ee); + wdata->dnd_motion_handler = + ecore_event_handler_add(ECORE_WL2_EVENT_DND_MOTION, + _wl_selection_dnd_motion, ee); + wdata->dnd_enter_handler = + ecore_event_handler_add(ECORE_WL2_EVENT_DND_ENTER, + _wl_selection_dnd_enter, ee); + wdata->dnd_drop_handler = + ecore_event_handler_add(ECORE_WL2_EVENT_DND_DROP, + _wl_selection_dnd_drop, ee); + wdata->dnd_end_handler = + ecore_event_handler_add(ECORE_WL2_EVENT_DATA_SOURCE_END, + _wl_selection_dnd_end, ee); + for (int i = 0; i < ECORE_EVAS_SELECTION_BUFFER_LAST; ++i) { wdata->selection_data[i].callbacks.available_types = NULL; -- 2.7.4