jayduhon / inferno-os

Automatically exported from code.google.com/p/inferno-os
2 stars 0 forks source link

tk->rect() returns rects with negative dy #260

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Date: Sun, 17 Apr 2011 12:05:28 +0200
From: Mechiel Lukkien <mechiel@ueber.net>
To: inferno-list@vitanuova.com
Mail-Followup-To: inferno-list@vitanuova.com
Subject: [inferno-list] tk->rect() returns rects with negative dy
Sender: inferno-list-admin@vitanuova.com
Errors-To: inferno-list-admin@vitanuova.com
Reply-To: inferno-list@vitanuova.com

tk->rect() can return rects with a max.y<min.y.
charon & wm/mand are two of the few programs using that function.
they both fail/crash when tk->rect() returns rects with negative dy,
because creating such an image fails.
this is easy to reproduce in wm/wm:  resize and make the new height
smaller than the titlebar.

changing tk->rect() so it sets max.y=min.y in this case looks good.
charon works then.  but wm/mand divides by zero.

should tk->rect() be changed?
or is there a use for rects with negative dy or dx?
wm/mand needs fixing in any case.

Original issue reported on code.google.com by Charles....@gmail.com on 19 Apr 2011 at 11:07

GoogleCodeExporter commented 9 years ago
committed changeset 510:61507b6ed24b
pushing to https://Charles.Forsyth:***@inferno-os.googlecode.com/hg
searching for changes

Original comment by Charles....@gmail.com on 19 Apr 2011 at 11:38