Enlightenment CVS committal

Author  : sebastid
Project : e17
Module  : apps/e

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


Modified Files:
        e_mod_main.c 


Log Message:
Dragging icon from border to pager now works! But since the menu
doesn't work when dragging is enabled, dragging is disabled.
For those who want dragging just remove the #if

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/modules/pager/e_mod_main.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -3 -r1.85 -r1.86
--- e_mod_main.c        25 Apr 2005 18:02:26 -0000      1.85
+++ e_mod_main.c        25 Apr 2005 20:56:52 -0000      1.86
@@ -1365,17 +1365,28 @@
 static void
 _pager_drop_cb(void *data, const char *type, void *event_info)
 {
-   E_Drop_Event *e;
+   E_Drop_Event *ev;
    Pager_Face *face;
-   int x, y, w, h;
+   E_Desk *desk;
+   E_Border *bd;
+   int x, y;
+   double w, h;
 
-   e = event_info;
+   ev = event_info;
    face = data;
 
-   x = e->x - face->fx;
-   y = e->y - face->fy;
-   w = x / face->xnum;
-   h = y / face->ynum;
+   w = face->fw / (double) face->xnum;
+   h = face->fh / (double) face->ynum;
 
-   printf("We have a drop! %d %d\n", w, h);
+   x = (ev->x - face->fx) / w;
+   y = (ev->y - face->fy) / h;
+
+   desk = e_desk_at_xy_get(face->zone, x, y);
+   bd = ev->data;
+
+   if ((bd) && (desk) && (bd->desk != desk))
+     {
+       e_border_desk_set(bd, desk);
+       e_border_hide(bd, 1);
+     }
 }




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to