Enlightenment CVS committal Author : raster Project : e17 Module : apps/e
Dir : e17/apps/e/src/modules/ibox Modified Files: e_mod_main.c Log Message: fix up dnd to handle stacked windows and move the burden of window offset handling etc. to dnd not the objects that create dnd zones. they onyl need to now worry about the dnd zone withint heir canvas/window/whatever =================================================================== RCS file: /cvs/e/e17/apps/e/src/modules/ibox/e_mod_main.c,v retrieving revision 1.66 retrieving revision 1.67 diff -u -3 -r1.66 -r1.67 --- e_mod_main.c 6 Sep 2006 21:40:17 -0000 1.66 +++ e_mod_main.c 17 Sep 2006 06:12:48 -0000 1.67 @@ -40,7 +40,6 @@ Evas_Object *o_ibox; IBox *ibox; E_Drop_Handler *drop_handler; - Ecore_Timer *drop_recalc_timer; }; struct _IBox @@ -94,7 +93,6 @@ static void _ibox_icon_signal_emit(IBox_Icon *ic, char *sig, char *src); //static IBox *_ibox_zone_find(E_Zone *zone); static Evas_List *_ibox_zone_find(E_Zone *zone); -static int _ibox_cb_timer_drop_recalc(void *data); static void _ibox_cb_obj_moveresize(void *data, Evas *e, Evas_Object *obj, void *event_info); static void _ibox_cb_menu_post(void *data, E_Menu *m); static void _ibox_cb_menu_configuration(void *data, E_Menu *m, E_Menu_Item *mi); @@ -132,7 +130,6 @@ E_Gadcon_Client *gcc; Instance *inst; Evas_Coord x, y, w, h; - int cx, cy, cw, ch; const char *drop[] = { "enlightenment/border" }; Config_Item *ci; @@ -156,21 +153,17 @@ inst->gcc = gcc; inst->o_ibox = o; - e_gadcon_canvas_zone_geometry_get(inst->gcc->gadcon, &cx, &cy, &cw, &ch); evas_object_geometry_get(o, &x, &y, &w, &h); inst->drop_handler = - e_drop_handler_add(inst, + e_drop_handler_add(inst->gcc->gadcon, inst, _ibox_inst_cb_enter, _ibox_inst_cb_move, _ibox_inst_cb_leave, _ibox_inst_cb_drop, - drop, 1, cx + x, cy + y, w, h); + drop, 1, x, y, w, h); evas_object_event_callback_add(o, EVAS_CALLBACK_MOVE, _ibox_cb_obj_moveresize, inst); evas_object_event_callback_add(o, EVAS_CALLBACK_RESIZE, _ibox_cb_obj_moveresize, inst); ibox_config->instances = evas_list_append(ibox_config->instances, inst); - /* FIXME: HACK!!!! */ - inst->drop_recalc_timer = ecore_timer_add(1.0, _ibox_cb_timer_drop_recalc, - inst); return gcc; } @@ -180,7 +173,6 @@ Instance *inst; inst = gcc->data; - ecore_timer_del(inst->drop_recalc_timer); ibox_config->instances = evas_list_remove(ibox_config->instances, inst); e_drop_handler_del(inst->drop_handler); _ibox_free(inst->ibox); @@ -436,11 +428,9 @@ _ibox_instance_drop_zone_recalc(Instance *inst) { Evas_Coord x, y, w, h; - int cx, cy, cw, ch; evas_object_geometry_get(inst->o_ibox, &x, &y, &w, &h); - e_gadcon_canvas_zone_geometry_get(inst->gcc->gadcon, &cx, &cy, &cw, &ch); - e_drop_handler_geometry_set(inst->drop_handler, cx + x, cy + y, w, h); + e_drop_handler_geometry_set(inst->drop_handler, x, y, w, h); } static IBox_Icon * @@ -606,16 +596,6 @@ } } return ibox; -} - -static int -_ibox_cb_timer_drop_recalc(void *data) -{ - Instance *inst; - - inst = data; - _ibox_instance_drop_zone_recalc(inst); - return 1; } static void ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs