ref: 95e15c3e1d44df027c177f41f837a0aa2bb74d13
parent: c7522489a3792242babd49980296ea21741d4426
author: cinap_lenrek <[email protected]>
date: Thu Feb 9 00:20:25 EST 2012
page: don't resize window bigger than the dislay
--- a/sys/src/cmd/page.c
+++ b/sys/src/cmd/page.c
@@ -159,6 +159,12 @@
return;
/* add rio border */
size = addpt(size, Pt(Borderwidth*2, Borderwidth*2));
+ if(display->image){
+ if(size.x > Dx(display->image->r))
+ size.x = Dx(display->image->r);
+ if(size.y > Dy(display->image->r))
+ size.y = Dy(display->image->r);
+ }
fprint(wctl, "resize -dx %d -dy %d\n", size.x, size.y);
close(wctl);
}