9front - general discussion about 9front
 help / color / mirror / Atom feed
From: mike@eff0ff.net
To: 9front@9front.org
Subject: [PATCH] Tiny rio bugfix
Date: Fri, 6 Mar 2020 13:50:21 +0100	[thread overview]
Message-ID: <52C0D1676E5ED662FF14AB8D643E95EE@t500> (raw)

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;



             reply	other threads:[~2020-03-06 12:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-06 12:50 mike [this message]
2020-03-07 19:42 ` [9front] " cinap_lenrek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52C0D1676E5ED662FF14AB8D643E95EE@t500 \
    --to=mike@eff0ff.net \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).