|
From: Enlightenment C. <no...@cv...> - 2006-10-16 10:40:16
|
Enlightenment CVS committal
Author : raster
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_dnd.c e_gadcon.c e_gadcon.h e_shelf.c
Log Message:
fix dnd for "below everything"
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_dnd.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -3 -r1.50 -r1.51
--- e_dnd.c 18 Sep 2006 03:49:44 -0000 1.50
+++ e_dnd.c 16 Oct 2006 10:40:10 -0000 1.51
@@ -537,7 +537,7 @@
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;
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_gadcon.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -3 -r1.48 -r1.49
--- e_gadcon.c 21 Sep 2006 20:05:44 -0000 1.48
+++ e_gadcon.c 16 Oct 2006 10:40:10 -0000 1.49
@@ -622,6 +622,22 @@
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)
{
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_gadcon.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -3 -r1.26 -r1.27
--- e_gadcon.h 10 Sep 2006 04:51:07 -0000 1.26
+++ e_gadcon.h 16 Oct 2006 10:40:10 -0000 1.27
@@ -80,6 +80,7 @@
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 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);
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_shelf.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -3 -r1.41 -r1.42
--- e_shelf.c 1 Oct 2006 20:10:37 -0000 1.41
+++ e_shelf.c 16 Oct 2006 10:40:10 -0000 1.42
@@ -105,7 +105,7 @@
}
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 @@
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);
|