aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2015-02-25 10:35:43 +0200
committerDaniel Zaoui <daniel.zaoui@yahoo.com>2015-02-25 10:35:43 +0200
commit106339d00f531502cd4cd356cfc4b718cd13de39 (patch)
tree44449a1f5602a9f286338f12b2b838850de035d2
parentexample: fix after change in eo_do syntax. (diff)
downloadelementary-106339d00f531502cd4cd356cfc4b718cd13de39.tar.gz
DnD/Wl: add cancel support
This feature permits cancellation of a DnD operation in the middle. @feature
-rw-r--r--src/lib/elm_cnp.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index 363d85128..f47ad5053 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -4538,23 +4538,25 @@ elm_drag_cancel(Evas_Object *obj)
ELM_SAFE_FREE(handler_up, ecore_event_handler_del);
ELM_SAFE_FREE(handler_status, ecore_event_handler_del);
ecore_x_dnd_abort(xwin);
- }
- if (dragwidget)
- {
- if (elm_widget_is(dragwidget))
+ if (dragwidget)
{
- Evas_Object *win = elm_widget_top_get(dragwidget);
- if (win && eo_isa(win, ELM_WIN_CLASS))
- evas_object_smart_callback_del_full(win, "rotation,changed",
- _x11_win_rotation_changed_cb, dragwin);
+ if (elm_widget_is(dragwidget))
+ {
+ Evas_Object *win = elm_widget_top_get(dragwidget);
+ if (win && eo_isa(win, ELM_WIN_CLASS))
+ evas_object_smart_callback_del_full(win, "rotation,changed",
+ _x11_win_rotation_changed_cb, dragwin);
+ }
}
+ goto end;
}
#endif
#ifdef HAVE_ELEMENTARY_WAYLAND
-/* Have to complete here.
- * if (elm_win_wl_window_get(obj)) ... */
+ if (_wl_elm_widget_window_get(obj))
+ ecore_wl_dnd_drag_end(ecore_wl_input_get());
#endif
+end:
ELM_SAFE_FREE(dragwin, evas_object_del);
dragdonecb = NULL;
dragacceptcb = NULL;