From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mxout014.mail.hostpoint.ch ([217.26.49.174]) by ewsd; Fri Mar 6 07:50:34 EST 2020 Received: from [10.0.2.45] (helo=asmtp012.mail.hostpoint.ch) by mxout014.mail.hostpoint.ch with esmtp (Exim 4.92.3 (FreeBSD)) (envelope-from ) id 1jACQp-000F3O-Fh for 9front@9front.org; Fri, 06 Mar 2020 13:50:23 +0100 Received: from 84-74-148-26.dclient.hispeed.ch ([84.74.148.26] helo=t500) by asmtp012.mail.hostpoint.ch with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.3 (FreeBSD)) (envelope-from ) id 1jACQp-0008N4-DL; Fri, 06 Mar 2020 13:50:23 +0100 X-Authenticated-Sender-Id: mike@eff0ff.net Message-ID: <52C0D1676E5ED662FF14AB8D643E95EE@t500> To: 9front@9front.org Subject: [PATCH] Tiny rio bugfix Date: Fri, 6 Mar 2020 13:50:21 +0100 From: mike@eff0ff.net MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: CMS package blockchain blockchain Hi Some-time lurker, first-time poster here. 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. Did nobody ever notice this or did it not get fixed because someone thought it was funny to have a BIG*Dx where it doesn't belong? diff -c /sys/src/cmd/rio/wctl.c rio/wctl.c /sys/src/cmd/rio/wctl.c:93,99 - rio/wctl.c:93,99 /* 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;