[PATCH weston] xdg-shell: Make stable

Bill Spitzak spitzak at gmail.com
Mon Aug 25 11:21:33 PDT 2014


On 08/25/2014 04:11 AM, Pekka Paalanen wrote:

> Let's also think about the size hints, how do they interact here, even
> if we are not adding them yet.
>
> The client creates a wl_surface, gives it content, and turns it into
> xdg_surface, and sends size hints.
>
> The compositor as a response to get_xdg_surface sends configure
 >
> then again as response to the size hints sends a new configure.
>
> Would that be right? Can the client count the configure events and know
> that the second configure will have its size hints taken into account?

No, please make it impossible for a client to rely on events being 
echoed in response to requests. Otherwise toolkits will rely on this and 
Wayland will become a synchronous protocol.

The compositor should assume the client obeyed it's own size hints. 
Therefore, for a normal overlapping window manager there is no configure 
event in response to changing the size hints.

It's true that a tiled window manager *may* send a configure event in 
response to a size hint because it used that size hint to figure out a 
window layout and the window layout requires the surface in a different 
size. However it will also send configure events to other surfaces since 
that new window layout changes their sizes as well. So there is nothing 
special about the one that sent the size hint.

If you want to insist that the surface size always obey the size hints, 
make it a protocol error for a client set them to incompatible values.

Also the creation of the xdg_shell_surface should not always send a 
configure event. It should only be sent if the surface size cannot be 
handled by the compositor.


More information about the wayland-devel mailing list