> > small needs fixing
> > + int width,
> > + int height,
> > we should check that its a positive number. (or use unsigned int and check
> > that its not 0x0)
>
> Curiously, we don't do that for mir_connection_create_spec_for_menu()
We don't check this for *any* of the existing mir_connection_create_spec_for_XXX() APIs and they all use "int" too. It is unclear what you believe the client side should do for nonpositive values:
1. consider it a precondition violation and:
1.1 check and abort() or
1.2 don't check as its the caller's responsibility.
2. make the "contract" wide and return an error object
As things stand the window manager isn't constrained by the requested and does something sensible with it.
Note also that these attributes of the spec can be updated before calling the server.
> > small needs fixing create_ spec_for_ menu()
> > + int width,
> > + int height,
> > we should check that its a positive number. (or use unsigned int and check
> > that its not 0x0)
>
> Curiously, we don't do that for mir_connection_
We don't check this for *any* of the existing mir_connection_ create_ spec_for_ XXX() APIs and they all use "int" too. It is unclear what you believe the client side should do for nonpositive values:
1. consider it a precondition violation and:
1.1 check and abort() or
1.2 don't check as its the caller's responsibility.
2. make the "contract" wide and return an error object
As things stand the window manager isn't constrained by the requested and does something sensible with it.
Note also that these attributes of the spec can be updated before calling the server.