Re: base size and resize increment window manager attributes



> > > +++ 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.
> 
> Could you quote the source or document where this rule is specified?
> 

Look at the X protocol specification for CreateWindow:

  The x and y coordinates for the window are relative to the parent’s origin
and specify the position
  of the upper-left outer corner of the window (not the origin). The width
and height specify the
  inside size (not including the border) and must be nonzero (or a Value
error results). The borderwidth
  for an InputOnly window must be zero (or a Match error results).

It is probably a bug of the Xlib manual that man XCreateWindow doesn't
mention this restriction.

> 
> This means that if the base_width and base_height are equal to zero then 
> the window is not resizable. In this case the manual should specify what
> happens when a window starts up with a size that is is not equal to
> (base_width, base_height). For instance there should be a rule that
> specifies:
> 
> +++ When width_inc is set to zero then the window shall be resized to have
> +++ a width of base_width. When the height_inc is set to zero than the
> +++ window should be set to have an initial size of base_height.
> 
> As a matter of fact there should be a rule stating whether or not windows 
> should be resized upon startup so that their size satisfies the above
> equations, and if so, then how the window should be resized (e.g.
> by rounding down).

You are still misunderstanding the division of responsibilities here. 

It is the responsibility of the wm to manage screen real estate, including
window sizes. It is the responsibility of the app to inform the wm about the
window sizes it prefers to work with, by setting the hints we're discussing
here. The wm may still resize the apps window to a size outside the
preferred set. If this happens, the client can either cope with it or unmap
the 
window. A client which maps a window with a size outside of its set of
preferred
sizes is either broken or ignorant and gets what it deserves.  

That said, the EWMH recommends setting minSize == maxSize to indicate that
a window should not be resized.

  
> To be precise, there should be a rule stating the following:
> 
> +++ baseSize should be less than or equal to minSize but greater than or 
> +++ equal to 1 in each coordinate, since as you stated, the X protocol
> +++ enforces the interor of a window is at least 1x1

No, there is no problem with a baseSize > minSize, and there is not problem
with setting minSize to 0 either. Just that you won't ever get a window
which actually has that size.

> > 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.
> 
> To be specific I am talking about /usr/bin/gnome-session as shipped
> >from package gnome-core-1.4.0.4-54 from the Red Hat 7.3 distribution.

Thats a session manager, not a window manager.

> 
> +++ There should be a rule stating that base_width and width_inc cannot be
> +++ simultaneously zero since this would imply a constant preferred with 
> +++ of zero which is impossible as you have stated.

Well, clients can request whatever they want. They just shouldn't expect the
wm to honour nonsensical hints.

> 
> +++ There should also be a section stating whether upon startup the window
> +++ should be resized to a preferred size or not. I think it should be.

No. The client gets what he deserves if he doesn't follow his own hints.

Matthias

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net




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