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:


i'm cleaning up dnd. fixed leaks. made dnd more convenient - less work to do
(it returns x,y coords relative to the drop target geom, not the screen,
start putting in all the necessary stuff in fm2 - can dnd 2 file now (drop
has no effect though)...

===================================================================
RCS file: /cvs/e/e17/apps/e/src/modules/ibox/e_mod_main.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -3 -r1.67 -r1.68
--- e_mod_main.c        17 Sep 2006 06:12:48 -0000      1.67
+++ e_mod_main.c        18 Sep 2006 03:49:45 -0000      1.68
@@ -297,8 +297,9 @@
                              e_util_zone_current_get(e_manager_current_get()),
                              cx + ev->output.x, cy + ev->output.y, 1, 1,
                              E_MENU_POP_DIRECTION_DOWN, ev->timestamp);
-       evas_event_feed_mouse_up(b->inst->gcc->gadcon->evas, ev->button,
-                                EVAS_BUTTON_NONE, ev->timestamp, NULL);
+       e_util_evas_fake_mouse_up_later(b->inst->gcc->gadcon->evas, ev->button);
+//     evas_event_feed_mouse_up(b->inst->gcc->gadcon->evas, ev->button,
+//                              EVAS_BUTTON_NONE, ev->timestamp, NULL);
      }
 }
 
@@ -684,8 +685,10 @@
                              e_util_zone_current_get(e_manager_current_get()),
                              cx + ev->output.x, cy + ev->output.y, 1, 1,
                              E_MENU_POP_DIRECTION_DOWN, ev->timestamp);
-       evas_event_feed_mouse_up(ic->ibox->inst->gcc->gadcon->evas, ev->button,
-                                EVAS_BUTTON_NONE, ev->timestamp, NULL);
+       e_util_evas_fake_mouse_up_later(ic->ibox->inst->gcc->gadcon->evas,
+                                       ev->button);
+//     evas_event_feed_mouse_up(ic->ibox->inst->gcc->gadcon->evas, ev->button,
+//                              EVAS_BUTTON_NONE, ev->timestamp, NULL);
      }
 }
 
@@ -738,9 +741,11 @@
 
             e_drag_resize(d, w, h);
             e_drag_start(d, ic->drag.x, ic->drag.y);
-            evas_event_feed_mouse_up(ic->ibox->inst->gcc->gadcon->evas,
-                                     1, EVAS_BUTTON_NONE, 
-                                     ecore_x_current_time_get(), NULL);
+            e_util_evas_fake_mouse_up_later(ic->ibox->inst->gcc->gadcon->evas,
+                                            1);
+//          evas_event_feed_mouse_up(ic->ibox->inst->gcc->gadcon->evas,
+//                                   1, EVAS_BUTTON_NONE, 
+//                                   ecore_x_current_time_get(), NULL);
             e_object_ref(E_OBJECT(ic->border));
             ic->ibox->icons = evas_list_remove(ic->ibox->icons, ic);
             _ibox_resize_handle(ic->ibox);
@@ -813,7 +818,7 @@
    Instance *inst;
    Evas_Object *o, *o2;
    IBox_Icon *ic;
-   int cx, cy, cw, ch;
+   Evas_Coord xx, yy;
    
    ev = event_info;
    inst = data;
@@ -830,8 +835,8 @@
    evas_object_layer_set(o2, 19999);
    evas_object_show(o);
    evas_object_show(o2);
-   e_gadcon_canvas_zone_geometry_get(inst->gcc->gadcon, &cx, &cy, &cw, &ch);
-   ic = _ibox_icon_at_coord(inst->ibox, ev->x - cx, ev->y - cy);
+   evas_object_geometry_get(inst->ibox->o_box, &xx, &yy, NULL, NULL);
+   ic = _ibox_icon_at_coord(inst->ibox, ev->x + xx, ev->y + yy);
    inst->ibox->ic_drop_before = ic;
    if (ic)
      {
@@ -841,11 +846,11 @@
        evas_object_geometry_get(ic->o_holder, &ix, &iy, &iw, &ih);
        if (e_box_orientation_get(inst->ibox->o_box))
          {
-            if ((ev->x - cx) < (ix + (iw / 2))) before = 1;
+            if ((ev->x + xx) < (ix + (iw / 2))) before = 1;
          }
        else
          {
-            if ((ev->y - cy) < (iy + (ih / 2))) before = 1;
+            if ((ev->y + yy) < (iy + (ih / 2))) before = 1;
          }
        if (before)
          e_box_pack_before(inst->ibox->o_box, inst->ibox->o_drop, 
ic->o_holder);
@@ -871,13 +876,13 @@
    E_Event_Dnd_Move *ev;
    Instance *inst;
    IBox_Icon *ic;
-   int cx, cy, cw, ch;
+   Evas_Coord xx, yy;
    
    ev = event_info;
    inst = data;
    e_box_unpack(inst->ibox->o_drop);
-   e_gadcon_canvas_zone_geometry_get(inst->gcc->gadcon, &cx, &cy, &cw, &ch);
-   ic = _ibox_icon_at_coord(inst->ibox, ev->x - cx, ev->y - cy);
+   evas_object_geometry_get(inst->ibox->o_box, &xx, &yy, NULL, NULL);
+   ic = _ibox_icon_at_coord(inst->ibox, ev->x, ev->y);
    inst->ibox->ic_drop_before = ic;
    if (ic)
      {
@@ -887,11 +892,11 @@
        evas_object_geometry_get(ic->o_holder, &ix, &iy, &iw, &ih);
        if (e_box_orientation_get(inst->ibox->o_box))
          {
-            if ((ev->x - cx) < (ix + (iw / 2))) before = 1;
+            if ((ev->x + xx) < (ix + (iw / 2))) before = 1;
          }
        else
          {
-            if ((ev->y - cy) < (iy + (ih / 2))) before = 1;
+            if ((ev->y + yy) < (iy + (ih / 2))) before = 1;
          }
        if (before)
          e_box_pack_before(inst->ibox->o_box, inst->ibox->o_drop, 
ic->o_holder);



-------------------------------------------------------------------------
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

Reply via email to