summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2020-04-06 12:37:40 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-04-07 10:58:28 +0200
commitf47371330a6d031a7421cb560511767a3a87a625 (patch)
tree2940e493e1624032cafbffa1a407ca272dfa32e3
parenta4ef152361540983152077f1e23f692b83fb5fc7 (diff)
efl_ui_dnd: cleanup when backend failed to create dnd op
this is needed to not have a dead window on the screen. Differential Revision: https://phab.enlightenment.org/D11654
-rw-r--r--src/lib/elementary/efl_ui_dnd.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/lib/elementary/efl_ui_dnd.c b/src/lib/elementary/efl_ui_dnd.c
index e8bf19320b..efa0669d99 100644
--- a/src/lib/elementary/efl_ui_dnd.c
+++ b/src/lib/elementary/efl_ui_dnd.c
@@ -49,11 +49,17 @@ _efl_ui_dnd_drag_start(Eo *obj, Efl_Ui_Dnd_Data *pd, Eina_Content *content, cons
49 elm_win_borderless_set(drag_win, EINA_TRUE); 49 elm_win_borderless_set(drag_win, EINA_TRUE);
50 drag_ee = ecore_evas_ecore_evas_get(evas_object_evas_get(drag_win)); 50 drag_ee = ecore_evas_ecore_evas_get(evas_object_evas_get(drag_win));
51 51
52 ecore_evas_drag_start(pd->ee, seat, content, drag_ee, action, _ecore_evas_drag_terminated, start); 52 if (!ecore_evas_drag_start(pd->ee, seat, content, drag_ee, action, _ecore_evas_drag_terminated, start))
53 53 {
54 evas_object_show(drag_win); 54 efl_del(drag_win);
55 55 free(start);
56 efl_event_callback_call(obj, EFL_UI_DND_EVENT_DRAG_STARTED, &ev); 56 drag_win = NULL;
57 }
58 else
59 {
60 evas_object_show(drag_win);
61 efl_event_callback_call(obj, EFL_UI_DND_EVENT_DRAG_STARTED, &ev);
62 }
57 63
58 return drag_win; 64 return drag_win;
59} 65}