[PATCH v2] xdg-shell: add preferred min/max size requests

Pekka Paalanen ppaalanen at gmail.com
Wed Apr 6 09:01:10 UTC 2016


On Wed, 6 Apr 2016 04:03:31 -0400 (EDT)
Olivier Fourdan <ofourdan at redhat.com> wrote:

> Hi Bill,
> 
> > I think it would be ok to set both the minimum and maximum with a single
> > request.  
> 
> Yes, agreed.

Why, what good does it do?

We have regretted before of putting two different things in the same
request when they do not necessarily have to be in the same request
(wl_surface.attach buffer vs. x,y), and there are no performance
reasons in this case either.

Unless there actually is a reason to put two things into one request
(e.g. width and height that don't make sense separated) then it should
be done, but if there is no such clear logical or obvious performance
reason, I would err on the side of making separate requests.

It's also a documentation thing, if some of the arguments behave one
way and others behave slightly differently.

I have never wished to be able to combine two requests into one, but I
have several time wished to be able to split a request into two by its
arguments.

So if you are sure that all clients will always submit those two
requests both at the same go, then please do merge them. Otherwise I'd
favour separating them.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20160406/f18236c7/attachment.sig>


More information about the wayland-devel mailing list