ref: 53b2ccf7f268f43f360486f4731b67b2bf53eac0
parent: b8bc8ef3e922398567d340d5cddf7a72fb2d1bff
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Sep 20 05:15:53 EDT 2016
rio: fix onscreen()
--- a/sys/src/cmd/rio/rio.c
+++ b/sys/src/cmd/rio/rio.c
@@ -364,8 +364,6 @@
Rectangle
whichrect(Rectangle r, Point p, int which)
{- p.x = min(p.x, screen->clipr.max.x-1);
- p.y = min(p.y, screen->clipr.max.y-1);
switch(which){case 0: /* top left */
r = Rect(p.x, p.y, r.max.x, r.max.y);
@@ -842,9 +840,9 @@
onscreen(Point p)
{p.x = max(screen->clipr.min.x, p.x);
- p.x = min(screen->clipr.max.x, p.x);
+ p.x = min(screen->clipr.max.x-1, p.x);
p.y = max(screen->clipr.min.y, p.y);
- p.y = min(screen->clipr.max.y, p.y);
+ p.y = min(screen->clipr.max.y-1, p.y);
return p;
}
--
⑨