Enlightenment CVS committal Author : raster Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_place.c Log Message: limit place coord to within the zone. =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_place.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -3 -r1.20 -r1.21 --- e_place.c 31 May 2006 18:44:18 -0000 1.20 +++ e_place.c 1 Jun 2006 05:43:54 -0000 1.21 @@ -157,6 +157,14 @@ *ry = y; return 1; #endif + + if ((w <= 0) || (h <= 0)) + { + printf("EEEK! trying to place 0x0 window!!!!\n"); + *rx = x; + *ry = y; + return 1; + } /* FIXME: this NEEDS optimizing */ a_w = 2; @@ -468,6 +476,12 @@ done: E_FREE(a_x); E_FREE(a_y); + + if ((*rx + w) > zone->w) *rx = zone->w - w; + if (*rx < 0) *rx = 0; + if ((*ry + h) > zone->h) *ry = zone->h - h; + if (*ry < 0) *ry = 0; + *rx += zone->x; *ry += zone->y; return 1; _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs