Why X protocol/server forbid zero width/height?
Carsten Haitzler (The Rasterman)
raster at rasterman.com
Wed Nov 23 09:14:51 PST 2005
On Wed, 23 Nov 2005 16:27:09 +0000 Glynn Clements <glynn at gclements.plus.com>
babbled:
>
> Dmitry Yu. Bolkhovityanov wrote:
>
> > As specs say, and as practice confirms, attempt to set XWindow's
> > width and/or height to 0 results in BadValue error.
> >
> > BUT: why such a design decision was made (19 years ago?)?
>
> This is just a guess, but does any code divide by the width or height?
>
> If that's something which happened a lot, it would be easier to simply
> prevent the fields from ever being set to zero in the first place than
> to have checks for zero scattered throughout the code.
no - there is really no need to divide byu width/hieght... BUt i woudl suspect
it avoids having to special case clipping code to work around 0 width/hiehgt
clip obstacles, or tro special case clip list generation. you have to special
case it somewhere to avoid ugliness... :)
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) raster at rasterman.com
裸好多
Tokyo, Japan (東京 日本)
More information about the xorg
mailing list