Mir

Code review comment for lp:~vanvugt/mir/managed-surface

Revision history for this message
Robert Carr (robertcarr) wrote :

I wonder if it would be easier (avoiding "SurfaceWrapper"), to use a controller pattern,

e.g. ms::SurfaceController::configure(ms::Surface const&, ...) ms::SurfaceController::resize...etc

Eventually implementation of these methods will require access to a lot of system state. At present, the display layout is pulled in, you can see obviously how it blossoms though, e.g. choosing placement requires looking at existing surfaces.

Likewise it seems as if these managed surface instances may have to share state? for example if you wanted to implement behavior like only one surface can be fullscreen at a time.

I have the thought that it may be easier to encode all this in a centralized controller object. This would make the responsibilities more clear, surface stores the data, the controller object acts as a way to access surface which injects policy as well. What do you think?

« Back to merge proposal