Re: base size and resize increment window manager attributes

> Here is one simple thing
> which should probably be part of the standard:
> +++ Each window must have an interior with a height of at least 1 pixel
> +++ and a width of at least one pixel.

This is already enforced by the X protocol.
> Another requirement should be:
> +++ The size increment should be always greater than 1.
> +++ Setting the size increment to a smaller amount is implementation
> +++ defined, i.e., should be avoided.

Well, its all only hints anyway, the clients should still try to work with
the window size the wm gave them. But in this particular case, I don't
see any problem with a size increment of 0. The ICCCM says:

The base_width and base_height elements in conjunction with width_inc and
height_inc define an arithmetic progression of preferred window widths and
heights for nonnegative integers i and j:

width = base_width + (i  width_inc)
height = base_height + (j  height_inc)

If one of width_inc or height_inc are 0, you get a sequence of preferred
sizes instead
of a grid, if both are 0, you get a single preferred size, namely the base
size. This seems
to enlarge the expressive power of this hint without causing any problems...
> +++ The size of a window SHOLD be computed as follows:
> Let k be some scalar factor.
> s = baseSize + k * sizeIncrement;
> if (s == 0) size = 1;
> else size = baseSize + k * sizeIncrement;

Don't forget the min and max size hints. I think it is pretty clear from 
ICCCM that a baseSize smaller than minSize is allowed. 

> Under the gnome, since the base size is (0, 0), gnome automatically
> bumps it to (1, 1) which means that the size computations above
> yield sizes of (1, 1), (3, 3), (5, 5), ...
> which is not what the user expected.

You have to be more specific here. "gnome" is not a window manager.
The behaviour you describe would be a bug of the wm you're running
gnome with.

> These things need to be sorted out and standardized because
> it can really mess things up for larger applications and we
> all need something to rely on.

I think the ICCCM is completely precise in this area. If anything, section
could contain a hint to watch out for division by zero when checking the
aspect ratio, since requested size - baseSize might be zero.


GMX - Die Kommunikationsplattform im Internet.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]