shithub: riscv

Download patch

ref: 20c27e0197f1907327b69b6ffbb1b1793dd25a58
parent: 1daf9bec767133a7341d08209f1d9272fba8bb52
author: cinap_lenrek <[email protected]>
date: Tue Mar 13 04:14:55 EDT 2012

rio: keep window rects managable on rio resize

--- a/sys/src/cmd/rio/rio.c
+++ b/sys/src/cmd/rio/rio.c
@@ -633,6 +633,8 @@
 		r.min.y = (r.min.y*n.y)/o.y;
 		r.max.x = (r.max.x*n.x)/o.x;
 		r.max.y = (r.max.y*n.y)/o.y;
+		if(!goodrect(r))
+			r = rectsubpt(w->i->r, viewr.min);
 		r = rectaddpt(r, screen->clipr.min);
 		ishidden = 0;
 		for(j=0; j<nhidden; j++)