Why X protocol/server forbid zero width/height?
Jim Gettys
jg at freedesktop.org
Wed Nov 23 02:49:34 PST 2005
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.
>
> Thanks in advance,
> Dmitry
>
> _________________________________________
> Dmitry Yu. Bolkhovityanov
> The Budker Institute of Nuclear Physics
> Novosibirsk, Russia
> _______________________________________________
> xorg mailing list
> xorg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xorg
More information about the xorg
mailing list