Why X protocol/server forbid zero width/height?

Glynn Clements glynn at gclements.plus.com
Wed Nov 23 08:27:09 PST 2005


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.

-- 
Glynn Clements <glynn at gclements.plus.com>



More information about the xorg mailing list