I feel configure events and requests are messed up

Bill Spitzak spitzak at gmail.com
Thu Sep 8 12:45:57 PDT 2011


Kristian Høgsberg wrote:

>> You want a concrete example? Consider edge tiling: in that mode, the
>> window is not resizable, and attempts to programmatically resize it
>> should be cached and reapplied when the window is desnapped. Shall we
>> tell the client it is edge tiled? If we go that road, we end up with
>> EMWH, trying to specify all possible window states...
> 
> Yes, the client needs to know that it can't resize at that time.  You
> can't force clients to behave a certain way by just clamping their
> size, they have to understand that they're being displayed in a
> certain way that means they can't currently resize freely.  Maybe
> we'll need a flag in the configiure event that tells the client "be
> this exact size" or maybe the client just needs to know that it's edge
> tiled and cant try to resize.

This is why I think the resize messages from compositor to client need 
to contain "edge" flags. There are 4, one for each edge. They indicate 
that the edge should not be moved AND that any border on that edge is 
not drawn (ie the window contents should extend to that side of the image).

Besides the use for tiled windows, the edge flags would also remove the 
borders that are off the screen edge for edge-snapped and maximized 
windows. There should also be a "title" flag to turn off the title bar 
so full-screen can be supported. I think this is better than just 
positioning the decorations outside the screen as it skips wasting time 
drawing them, it works on edges of multiple screens (rather than the 
decoration appearing on the adjacent screen), and I suspect Wayland will 
be able to detect direct mapping of full-screen if the window is exactly 
the size of the screen.

Clients are supposed to obey these flags and not request size+position 
that moves them. Clients can disobey however and compositors should be 
prepared for this, probably by clipping the surface and/or padding it 
with solid rectangles to fill the requested area.

There currently is something called "edge" in the resize events but it 
appears these are indicating what type of resize is being done, so that 
if the client decides to alter the size they can move the corner the 
user is dragging. These flags are also necessary. In fact if an edge 
border is removed and these flags indicate the opposite edge is not 
being dragged the client will have to move that edge so the window 
contents remain the same size, as only it knows how thick the borders are.



More information about the wayland-devel mailing list