Mir

Code review comment for lp:~raof/mir/waylanding-again

Revision history for this message
Chris Halse Rogers (raof) wrote :

On Thu, Sep 7, 2017 at 9:18 PM, Alan Griffiths <email address hidden>
wrote:
> +#include "mir/default_server_configuration.h"
> +#include "wayland_connector.h"
> +
> +#include "../../scene/mediating_display_changer.h"
>
> #include "mir/frontend/display_changer.h"
>
> +#include "mir/graphics/platform.h"
> +
> +namespace mf = mir::frontend;
> +
> +std::shared_ptr<mf::Connector>
> + mir::DefaultServerConfiguration::the_wayland_connector()
> +{
> + return wayland_connector(
> + [this]() -> std::shared_ptr<mf::Connector>
> + {
> + return std::make_shared<mf::WaylandConnector>(
> + the_frontend_shell(),
> + *the_mediating_display_changer(),
>
> *the_frontend_display_changer(),
>
> (Do we really want to avoid sharing ownership? Where's the lifetime
> guarantee?)

The lifetime guarantee is that WaylandConnector does not store any
reference to the mf::DisplayChanger; it's purely used at initialisation
time.

« Back to merge proposal