Mir

Code review comment for lp:~mterry/mir/session-for-surface

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> I'm still trying to think of a better route that satisfies this case!

Maybe we need to clarify "this case" - this MP simply adds a parameter without a driving test case.

Consequentially we're probably all guessing at the problem it solves.

> I think this route isn't the way to go as these kind of relationships tend to
> make testing/refactoring difficult. I am also a little worried it may be
> unsafe:

I think the point is to make the session known at the point of building the surfaces::Surface - not long term storage. Vis:

72 + virtual std::weak_ptr<surfaces::Surface> create_surface(Session* session, SurfaceCreationParameters const& params) = 0;

Although, it isn't used in SurfaceController::create_surface() - which I would imagine is the intended consumer.

review: Needs Information

« Back to merge proposal