Enlightenment CVS committal

Author  : sebastid
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/modules/ibar


Modified Files:
        e_mod_main.c 


Log Message:
The icon is now correctly positioned relative to the mouse.

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/modules/ibar/e_mod_main.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -3 -r1.52 -r1.53
--- e_mod_main.c        14 May 2005 14:06:09 -0000      1.52
+++ e_mod_main.c        15 May 2005 05:20:18 -0000      1.53
@@ -1240,22 +1240,25 @@
        double dist;
 
        dist = sqrt(pow((ev->cur.output.x - drag_x), 2) + pow((ev->cur.output.y 
- drag_y), 2));
-       if (dist > 10)
+       if (dist > 4)
          {
             E_Drag *d;
             Evas_Object *o;
+            Evas_Coord x, y, w, h;
 
             drag = 1;
             drag_start = 0;
 
-            d = e_drag_new(ic->ibb->con, "enlightenment/eapp",
+            evas_object_geometry_get(ic->icon_object,
+                                     &x, &y, &w, &h);
+            d = e_drag_new(ic->ibb->con, x, y, "enlightenment/eapp",
                            ic->app, _ibar_bar_cb_finished);
             o = edje_object_add(e_drag_evas_get(d));
             edje_object_file_set(o, ic->app->path, "icon");
             e_drag_object_set(d, o);
 
-            e_drag_resize(d, ic->ibb->ibar->conf->iconsize, 
ic->ibb->ibar->conf->iconsize);
-            e_drag_start(d);
+            e_drag_resize(d, w, h);
+            e_drag_start(d, drag_x, drag_y);
             evas_event_feed_mouse_up(ic->ibb->evas, 1, EVAS_BUTTON_NONE, NULL);
             e_app_remove(ic->app);
          }




-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to