comparison client.c @ 5:e060ab82b136

gapless grid
author paulo@thepaulopc
date Wed, 27 Jan 2010 23:28:29 -0800
parents 7024076fa948
children 0968b3739b8d
comparison
equal deleted inserted replaced
0:b28d4f5cbf01 1:39c7228ceeaa
498 nx = xAbs == 'X' ? x : sel->x + x; 498 nx = xAbs == 'X' ? x : sel->x + x;
499 ny = yAbs == 'Y' ? y : sel->y + y; 499 ny = yAbs == 'Y' ? y : sel->y + y;
500 nw = wAbs == 'W' ? w : sel->w + w; 500 nw = wAbs == 'W' ? w : sel->w + w;
501 nh = hAbs == 'H' ? h : sel->h + h; 501 nh = hAbs == 'H' ? h : sel->h + h;
502 502
503 if(xAbs == 'X') {
504 if(nx < wax)
505 nx = wax;
506 else if(nx + nw + 2*BORDERPX > waw)
507 nx = wax + waw - nw - 2*BORDERPX;
508 }
509 if(yAbs == 'Y') {
510 if(ny < way)
511 ny = way;
512 else if(ny + nh + 2*BORDERPX > wah)
513 ny = way + wah - nh - 2*BORDERPX;
514 }
515
503 ox = sel->x; 516 ox = sel->x;
504 oy = sel->y; 517 oy = sel->y;
505 ow = sel->w; 518 ow = sel->w;
506 oh = sel->h; 519 oh = sel->h;
507 520