> > Yes the actual input device hub is kept alive via loaded platform / input
> manager / DisplayServer
> > and also via ipc factory / Connector / DisplayServer. I am using a weak_ptr
> to avoid a cycle
> > between hub and observers.
>
> Hmm, still... the fact that if one calls
> mir::DefaultServerConfiguration::the_input_device_hub() as the first or only
> input-related method, they will get a broken InputDeviceHub is super-
> unintuitive and makes me very uneasy.
>
> Couldn't mi::ExternalInputDeviceHub hold a shared_ptr<> to the hub? It makes
> sense for a wrapper to hold a strong reference, not a weak one. The
> Internal/Observer class would continue to hold a weak_ptr (or even a raw
> pointer, if we can guarantee the related lifetimes) to break the cycle.
> > Yes the actual input device hub is kept alive via loaded platform / input verConfiguratio n::the_ input_device_ hub() as the first or only utDeviceHub hold a shared_ptr<> to the hub? It makes
> manager / DisplayServer
> > and also via ipc factory / Connector / DisplayServer. I am using a weak_ptr
> to avoid a cycle
> > between hub and observers.
>
> Hmm, still... the fact that if one calls
> mir::DefaultSer
> input-related method, they will get a broken InputDeviceHub is super-
> unintuitive and makes me very uneasy.
>
> Couldn't mi::ExternalInp
> sense for a wrapper to hold a strong reference, not a weak one. The
> Internal/Observer class would continue to hold a weak_ptr (or even a raw
> pointer, if we can guarantee the related lifetimes) to break the cycle.
Oh I have not thought of that... pushed.