Why X protocol/server forbid zero width/height?

Dmitry Yu. Bolkhovityanov D.Yu.Bolkhovityanov at inp.nsk.su
Tue Nov 22 21:35:07 PST 2005


  	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.

  	Thanks in advance,
  		Dmitry

  	_________________________________________
  	  Dmitry Yu. Bolkhovityanov
  	  The Budker Institute of Nuclear Physics
  	  Novosibirsk, Russia



More information about the xorg mailing list