ref: 1a1b4b54b3e1553b36f18f1617ad8cb487442155
parent: feb6d6f0a32e5dac88d1ef46bbc4396ec44ce40b
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Mar 7 15:41:46 EST 2020
rio: fix goodrect() bug (thanks mike) mike from eff0ff.net reported the following: > I was running a second instance of rio inside a rio window and > suddenly weird things started happening. The second instance started > imposing arbitrary limits on the size of its windows and refused to > resize some of its windows when its own window was resized. > Turns out this happens if rio's screen is 3 times as high as wide > because of a tiny mistake in its goodrect function. ... and kindly provided a patch. thanks!
--- a/sys/src/cmd/rio/wctl.c
+++ b/sys/src/cmd/rio/wctl.c
@@ -93,7 +93,7 @@
/* reasonable sizes only please */
if(Dx(r) > BIG*Dx(screen->r))
return 0;
- if(Dy(r) > BIG*Dx(screen->r))
+ if(Dy(r) > BIG*Dy(screen->r))
return 0;
if(Dx(r) < 100 || Dy(r) < 3*font->height)
return 0;