diff options
Diffstat (limited to 'src/Fl_Tile.cxx')
| -rw-r--r-- | src/Fl_Tile.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Fl_Tile.cxx b/src/Fl_Tile.cxx index a211fd673..a747a93ed 100644 --- a/src/Fl_Tile.cxx +++ b/src/Fl_Tile.cxx @@ -52,17 +52,17 @@ void Fl_Tile::position(int oix, int oiy, int newx, int newy) { int R = X+o->w(); if (oix) { int t = p[0]; - if (t == oix || t>oix && X<newx || t<oix && X>newx) X = newx; + if (t == oix || (t>oix && X<newx) || (t<oix && X>newx) ) X = newx; t = p[1]; - if (t == oix || t>oix && R<newx || t<oix && R>newx) R = newx; + if (t == oix || (t>oix && R<newx) || (t<oix && R>newx) ) R = newx; } int Y = o->y(); int B = Y+o->h(); if (oiy) { int t = p[2]; - if (t == oiy || t>oiy && Y<newy || t<oiy && Y>newy) Y = newy; + if (t == oiy || (t>oiy && Y<newy) || (t<oiy && Y>newy) ) Y = newy; t = p[3]; - if (t == oiy || t>oiy && B<newy || t<oiy && B>newy) B = newy; + if (t == oiy || (t>oiy && B<newy) || (t<oiy && B>newy) ) B = newy; } o->damage_resize(X,Y,R-X,B-Y); } |
