From aa52a73fcdb211101b865d57dd1c6f1ebca31e8c Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Tue, 12 Jul 2011 12:16:58 +0000 Subject: [PATCH] Elm dnd: abort drop_target_add if this is not an X window. This fixes the issue with the shot module, and possibly when running on other non-X engines when elementary is built with X support. SVN revision: 61287 --- legacy/elementary/src/lib/elm_cnp_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/legacy/elementary/src/lib/elm_cnp_helper.c b/legacy/elementary/src/lib/elm_cnp_helper.c index 3f3d2cbe12..77b39694ba 100644 --- a/legacy/elementary/src/lib/elm_cnp_helper.c +++ b/legacy/elementary/src/lib/elm_cnp_helper.c @@ -1348,8 +1348,11 @@ elm_drop_target_add(Evas_Object *obj, Elm_Sel_Type format, Elm_Drop_Cb dropcb, v Ecore_X_Window xwin; Eina_List *item; int first; + Evas_Object *top; if (!obj) return EINA_FALSE; + top = elm_widget_top_get(obj); + if (!top || !elm_win_xwindow_get(top)) return EINA_FALSE; if (!_elm_cnp_init_count) _elm_cnp_init(); /* Is this the first? */