[PATCH weston] xdg-shell: Make stable

Pekka Paalanen ppaalanen at gmail.com
Mon Aug 25 23:25:32 PDT 2014


On Mon, 25 Aug 2014 11:21:33 -0700
Bill Spitzak <spitzak at gmail.com> wrote:

> 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.

Did you understand that this is not an additional round-trip, but it
conflates to the original roundtrip?

Yes, I agree counting events is a bad approach, but I also wanted to
list all options coming to my mind. Think of it as a trap, if you wish.

> 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.

I do not understand you.

> 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.

The moment xdg_surface is created, the compositor has no information
about the size the client intends to use, and therefore cannot know if
the size can or can not be handled as is.

Also, size is not the only piece of state in a configure event. I don't
think we can avoid the one roundtrip on window creation.


Thanks,
pq


More information about the wayland-devel mailing list