@@ 459,11 459,15 @@ setmode(int v)
void
select(int x, int y, int w, int h)
{
- cursor.x = clamp(x, 0, HOR - 1);
- cursor.y = clamp(y, 0, VER - 1);
- cursor.w = clamp(w, 1, HOR - x + 1);
- cursor.h = clamp(h, 1, VER - y + 1);
- redraw(pixels);
+ Rect2d r;
+ r.x = clamp(x, 0, HOR - 1);
+ r.y = clamp(y, 0, VER - 1);
+ r.w = clamp(w, 1, HOR - x + 1);
+ r.h = clamp(h, 1, VER - y + 1);
+ if(r.x != cursor.x || r.y != cursor.y || r.w != cursor.w || r.h != cursor.h) {
+ cursor = r;
+ redraw(pixels);
+ }
}
void