Why X protocol/server forbid zero width/height?

Russell Shaw rjshaw at netspace.net.au
Wed Nov 23 02:59:57 PST 2005


Jim Gettys wrote:
> I have no clue; I certainly don't remember any reason for this in the
> dusty attic of my brain. 
> 				- Jim
> b
> 
> On Wed, 2005-11-23 at 11:35 +0600, Dmitry Yu. Bolkhovityanov wrote:
> 
>>  	Hi!
>>
>>  	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?)?
>>
>>  	Zero width and/or height seem to be a natural concept (so that
>>windows can exist and be "invisible" when they have no content -- this is 
>>particularly useful for container windows).  And forbidding zero size 
>>creates a "hole" in "size space", so that all widgets have to avoid 
>>zero size, including unnatural code like "if (width==0) width=1".
>>
>>  	Googling through Usenet gave no answer to this question.
>>
>>P.S. Of course, now this can't be changed -- but the reasons of that
>>       decision are of interest for better understanding of X ideology.

It should be able to be changed if you do your own extension. I'm going
to fix lots of things for my own uses.



More information about the xorg mailing list