From: Enlightenment S. <no-...@en...> - 2011-11-25 07:46:59
|
Log: lets drop icons correctly if efm view is not at 0,0 Author: raster Date: 2011-11-24 23:46:50 -0800 (Thu, 24 Nov 2011) New Revision: 65592 Trac: http://trac.enlightenment.org/e/changeset/65592 Modified: trunk/e/src/bin/e_fm.c Modified: trunk/e/src/bin/e_fm.c =================================================================== --- trunk/e/src/bin/e_fm.c 2011-11-25 07:13:41 UTC (rev 65591) +++ trunk/e/src/bin/e_fm.c 2011-11-25 07:46:50 UTC (rev 65592) @@ -6254,11 +6254,19 @@ if ((ic) && (_e_fm2_view_mode_get(sd) == E_FM2_VIEW_MODE_CUSTOM_ICONS)) { - /* dnd doesn't tell me all the co-ords of the icons being dragged so i can't place them accurately. - * need to fix this. ev->data probably needs to become more compelx than a list of url's - */ - x = ev->x + (ic->x - ox) - ic->drag.x + sd->pos.x; - y = ev->y + (ic->y - oy) - ic->drag.y + sd->pos.y; + /* dnd doesn't tell me all the co-ords of the icons being dragged so i can't place them accurately. + * need to fix this. ev->data probably needs to become more compelx than a list of url's + */ + + x = ev->x + (ic->x - ox) - ic->drag.x + sd->pos.x - sd->x; + y = ev->y + (ic->y - oy) - ic->drag.y + sd->pos.y - sd->y; + + printf("drop ev x, y: %i %i \n", ev->x, ev->y); + printf("ic x, y: %i %i \n", ic->x, ic->y); + printf("orig x, y: %i %i \n", ox, oy); + printf("ic->drag x, y: %i %i \n", ic->drag.x, ic->drag.y); + printf("sd->pos x, y: %i %i \n", sd->pos.x, sd->pos.y); + printf("x, y of drop: %i %i \n", x, y); if (x < 0) x = 0; if (y < 0) y = 0; |