Where do we validate surface attributes?

Cemil Azizoglu cemil.azizoglu at canonical.com
Tue Jun 30 16:21:10 UTC 2015


My understanding, after discussion during standup, is that the validation
of attributes should be left to the WM policy. Mir will have a default one,
but shells can override it if they so choose. Though this approach has some
shortcomings.

Of course, a shell can only diverge so much from the default policy. E.g.
implementing a VR shell without changing the client side semantics would
not be possible. So a new shell would still have to be bound by the
existing notions of what a Dialog, or a tooltip is. But within reasonable
limits, some tweaks to behavior can be made (everything fullscreen, etc).

Invalid combinations of attributes will generate errors and logged so
clients can figure out what they are doing wrong.

A problem I see is that this would require clients to be aware of which
shell they are running on so they generate attribute settings that conform
to that particular shell. That doesn't sounds like a good thing. An
application running perfectly on a particular shell may start getting
errors on a new shell. Not sure what we can do there. Anybody have ideas?


On Tue, Jun 30, 2015 at 1:39 AM, <raof at ubuntu.com> wrote:

> Hey all,
>
> In response to Alan's comment¹ and my follow-up² I'd like to bring up a
> design question: do we validate surface states before handing them off to
> the shell, and if so, where?
>
> Previously we ensured that client couldn't create invalid surfaces - a
> menu without a parent, a normal surface with a parent, etc - by making
> impossible to express such surfaces through the client API.
>
> We've abandoned that approach, as it was starting to impose significant
> costs for not a huge gain, and now clients can create whatever
> MirSurfaceSpec they desire.
>
> I think we should still do that validation before handing off to the
> shell. My understanding is that AbstractShell::WindowManager is expected to
> be Shell code, so this would be a filter between FrontendShell and
> AbstractShell?
>
> What do others think? Do we want to do the validation at all, or should we
> punt it to the shell?
>
> ¹:
> https://code.launchpad.net/~raof/mir/input-methods-can-specify-foreign-parents/+merge/258001/comments/656064
> ²:
> https://code.launchpad.net/~raof/mir/input-methods-can-specify-foreign-parents/+merge/258001/comments/658830
>
>
> --
> Mir-devel mailing list
> Mir-devel at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/mir-devel
>



-- 
Cemil Azizoglu
Mir Display Server - Team Lead
Canonical USA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/mir-devel/attachments/20150630/8d82b930/attachment.html>


More information about the Mir-devel mailing list