From 1a1b4b54b3e1553b36f18f1617ad8cb487442155 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sat, 7 Mar 2020 20:41:46 +0100 Subject: [PATCH] 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! --- sys/src/cmd/rio/wctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/src/cmd/rio/wctl.c b/sys/src/cmd/rio/wctl.c index cb5acb64a..59c9246c9 100644 --- a/sys/src/cmd/rio/wctl.c +++ b/sys/src/cmd/rio/wctl.c @@ -93,7 +93,7 @@ goodrect(Rectangle r) /* 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;