diff --git a/src/bin/e_dnd.c b/src/bin/e_dnd.c index b28f3087e..ec00d46fb 100644 --- a/src/bin/e_dnd.c +++ b/src/bin/e_dnd.c @@ -537,7 +537,7 @@ _e_drag_win_matches(E_Drop_Handler *h, Ecore_X_Window win) switch (h->obj->type) { case E_GADCON_TYPE: - hwin = ecore_evas_software_x11_window_get(((E_Gadcon *)(h->obj))->ecore_evas); + hwin = e_gadcon_dnd_window_get((E_Gadcon *)(h->obj)); break; case E_WIN_TYPE: hwin = ((E_Win *)(h->obj))->evas_win; diff --git a/src/bin/e_gadcon.c b/src/bin/e_gadcon.c index dbcaa7a7b..b7bbd2618 100644 --- a/src/bin/e_gadcon.c +++ b/src/bin/e_gadcon.c @@ -622,6 +622,22 @@ e_gadcon_util_menu_attach_func_set(E_Gadcon *gc, gc->menu_attach.data = data; } +EAPI void +e_gadcon_dnd_window_set(E_Gadcon *gc, Ecore_X_Window win) +{ + E_OBJECT_CHECK(gc); + E_OBJECT_TYPE_CHECK(gc, E_GADCON_TYPE); + gc->dnd_win = win; +} + +EAPI Ecore_X_Window +e_gadcon_dnd_window_get(E_Gadcon *gc) +{ + E_OBJECT_CHECK_RETURN(gc, 0); + E_OBJECT_TYPE_CHECK_RETURN(gc, E_GADCON_TYPE, 0); + return gc->dnd_win; +} + EAPI E_Gadcon_Client * e_gadcon_client_new(E_Gadcon *gc, const char *name, const char *id, const char *style, Evas_Object *base_obj) { diff --git a/src/bin/e_gadcon.h b/src/bin/e_gadcon.h index 51ed49573..2bfab0bba 100644 --- a/src/bin/e_gadcon.h +++ b/src/bin/e_gadcon.h @@ -80,6 +80,7 @@ struct _E_Gadcon E_Config_Dialog *config_dialog; unsigned char editing : 1; + Ecore_X_Window dnd_win; }; #define GADCON_CLIENT_CLASS_VERSION 1 @@ -164,7 +165,9 @@ EAPI E_Zone *e_gadcon_zone_get(E_Gadcon *gc); EAPI void e_gadcon_ecore_evas_set(E_Gadcon *gc, Ecore_Evas *ee); EAPI int e_gadcon_canvas_zone_geometry_get(E_Gadcon *gc, int *x, int *y, int *w, int *h); EAPI void e_gadcon_util_menu_attach_func_set(E_Gadcon *gc, void (*func) (void *data, E_Menu *menu), void *data); - +EAPI void e_gadcon_dnd_window_set(E_Gadcon *gc, Ecore_X_Window win); +EAPI Ecore_X_Window e_gadcon_dnd_window_get(E_Gadcon *gc); + EAPI E_Gadcon_Client *e_gadcon_client_new(E_Gadcon *gc, const char *name, const char *id, const char *style, Evas_Object *base_obj); EAPI void e_gadcon_client_edit_begin(E_Gadcon_Client *gcc); EAPI void e_gadcon_client_edit_end(E_Gadcon_Client *gcc); diff --git a/src/bin/e_shelf.c b/src/bin/e_shelf.c index ec69461c4..2e34499ea 100644 --- a/src/bin/e_shelf.c +++ b/src/bin/e_shelf.c @@ -105,7 +105,7 @@ e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, int popup, i } else { - e_drop_xdnd_register_set(zone->container->bg_win, 1); + e_drop_xdnd_register_set(zone->container->event_win, 1); es->ee = zone->container->bg_ecore_evas; es->evas = zone->container->bg_evas; } @@ -165,6 +165,10 @@ e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, int popup, i edje_object_message_signal_process(es->o_base); e_gadcon_zone_set(es->gadcon, zone); e_gadcon_ecore_evas_set(es->gadcon, es->ee); + if (popup) + e_gadcon_dnd_window_set(es->gadcon, es->popup->evas_win); + else + e_gadcon_dnd_window_set(es->gadcon, zone->container->event_win); e_gadcon_util_menu_attach_func_set(es->gadcon, _e_shelf_cb_menu_items_append, es);