From c2506978a5217c034176f0189f14871b84c951a4 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 --- src/lib/elm_cnp_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/elm_cnp_helper.c b/src/lib/elm_cnp_helper.c index 3f3d2cb..77b3969 100644 --- a/src/lib/elm_cnp_helper.c +++ b/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? */ -- 2.7.4