Enlightenment CVS committal Author : raster Project : e17 Module : apps/e
Dir : e17/apps/e/src/modules/ibar 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/ibar/e_mod_main.c,v retrieving revision 1.144 retrieving revision 1.145 diff -u -3 -r1.144 -r1.145 --- e_mod_main.c 17 Sep 2006 00:13:11 -0000 1.144 +++ e_mod_main.c 17 Sep 2006 06:12:48 -0000 1.145 @@ -40,8 +40,7 @@ Evas_Object *o_ibar; IBar *ibar; E_Drop_Handler *drop_handler; - Ecore_Timer *drop_recalc_timer; - const char *dir; + const char *dir; }; struct _IBar @@ -93,7 +92,6 @@ static void _ibar_icon_empty(IBar_Icon *ic); static void _ibar_icon_signal_emit(IBar_Icon *ic, char *sig, char *src); static void _ibar_cb_app_change(void *data, E_App *a, E_App_Change ch); -static int _ibar_cb_timer_drop_recalc(void *data); static void _ibar_cb_obj_moveresize(void *data, Evas *e, Evas_Object *obj, void *event_info); static void _ibar_cb_menu_icon_properties(void *data, E_Menu *m, E_Menu_Item *mi); static void _ibar_cb_menu_icon_remove(void *data, E_Menu *m, E_Menu_Item *mi); @@ -125,7 +123,6 @@ E_Gadcon_Client *gcc; Instance *inst; Evas_Coord x, y, w, h; - int cx, cy, cw, ch; const char *drop[] = { "enlightenment/eapp", "enlightenment/border", "text/uri-list" }; Config_Item *ci; @@ -146,21 +143,17 @@ inst->gcc = gcc; inst->o_ibar = 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, _ibar_inst_cb_enter, _ibar_inst_cb_move, _ibar_inst_cb_leave, _ibar_inst_cb_drop, - drop, 3, cx + x, cy + y, w, h); + drop, 3, x, y, w, h); evas_object_event_callback_add(o, EVAS_CALLBACK_MOVE, _ibar_cb_obj_moveresize, inst); evas_object_event_callback_add(o, EVAS_CALLBACK_RESIZE, _ibar_cb_obj_moveresize, inst); ibar_config->instances = evas_list_append(ibar_config->instances, inst); - /* FIXME: HACK!!!! */ - inst->drop_recalc_timer = ecore_timer_add(1.0, _ibar_cb_timer_drop_recalc, - inst); return gcc; } @@ -171,7 +164,6 @@ inst = gcc->data; evas_stringshare_del(inst->dir); - ecore_timer_del(inst->drop_recalc_timer); ibar_config->instances = evas_list_remove(ibar_config->instances, inst); e_drop_handler_del(inst->drop_handler); _ibar_free(inst->ibar); @@ -425,11 +417,9 @@ _ibar_instance_drop_zone_recalc(Instance *inst) { Evas_Coord x, y, w, h; - int cx, cy, cw, ch; evas_object_geometry_get(inst->o_ibar, &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 Config_Item * @@ -772,16 +762,6 @@ default: break; } -} - -static int -_ibar_cb_timer_drop_recalc(void *data) -{ - Instance *inst; - - inst = data; - _ibar_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