> 13 + * to get notified about hardware changes, so that the can apply a
> new config.
> Typo, the→they
>
> 15 + * \warning This request may be denied. Check that the request
> succeeded with mir_connection_get_error_message.
> You've copy-pasted these warnings. They don't apply; clients get notified via
> their registered error handler.
>
> 252 + mir::protobuf::Void * response,
> Nit: Coding style
>
> 291 + virtual void remove(std::shared_ptr<Session> const&) = 0;
> Not wild on the naming - could this be remove_session_configuration?
>
> 336 + else if ("remove_display" == invocation.method_name())
> And likewise, "remove_display_configuration" (or some equivalent)?
All good suggestions.
>
> 532 +void ms::MediatingDisplayChanger::remove(
> 533 + std::shared_ptr<mf::Session> const& session)
> 534 +{
> 535 + std::lock_guard<std::mutex> lg{configuration_mutex};
> 536 + config_map.erase(session);
> 537 + observer->session_configuration_removed(session);
> 538 +}
> Shouldn't this result in a hardware configuration change if (and only if) the
> session is currently focused? This will result in the configuration being set
> to the base config the *next* time the session is focused.
Hmm yes, i would think that sounds like a better behaviour.
>
> Which leads me into: please add some acceptance tests testing the expected
> behaviour. Particularly:
> 1) That calling remove_session_display_config from a client that hasn't set a
> session configuration is a no-op
> 2) That calling remove_session_display_config from a *focused* client that
> *has* set a session configuration results in a hardware configuration change
> 3) That calling remove_session_display_config from an *unfocused* client that
> *has* set a session configuration results in *no* hardware configuration
> change
> 4) That calling remove_session_display_config from an *unfocused* client that
> *has* set a session configuration results in the base configuration getting
> applied when the client becomes focused.
Good idea, I was thinking about doing some of these tests but ... wasnt sure.
I also wanted to write some unit test which matched the set session config but theres no accessing point to the config_map[]. Soo I think EXEPCT_CALLS(_) are still fine. Plus these other tests.
> 13 + * to get notified about hardware changes, so that the can apply a get_error_ message. std::shared_ ptr<Session> const&) = 0; session_ configuration? method_ name()) display_ configuration" (or some equivalent)?
> new config.
> Typo, the→they
>
> 15 + * \warning This request may be denied. Check that the request
> succeeded with mir_connection_
> You've copy-pasted these warnings. They don't apply; clients get notified via
> their registered error handler.
>
> 252 + mir::protobuf::Void * response,
> Nit: Coding style
>
> 291 + virtual void remove(
> Not wild on the naming - could this be remove_
>
> 336 + else if ("remove_display" == invocation.
> And likewise, "remove_
All good suggestions.
> splayChanger: :remove( ptr<mf: :Session> const& session) guard<std: :mutex> lg{configuratio n_mutex} ; map.erase( session) ; >session_ configuration_ removed( session) ;
> 532 +void ms::MediatingDi
> 533 + std::shared_
> 534 +{
> 535 + std::lock_
> 536 + config_
> 537 + observer-
> 538 +}
> Shouldn't this result in a hardware configuration change if (and only if) the
> session is currently focused? This will result in the configuration being set
> to the base config the *next* time the session is focused.
Hmm yes, i would think that sounds like a better behaviour.
> session_ display_ config from a client that hasn't set a session_ display_ config from a *focused* client that session_ display_ config from an *unfocused* client that session_ display_ config from an *unfocused* client that
> Which leads me into: please add some acceptance tests testing the expected
> behaviour. Particularly:
> 1) That calling remove_
> session configuration is a no-op
> 2) That calling remove_
> *has* set a session configuration results in a hardware configuration change
> 3) That calling remove_
> *has* set a session configuration results in *no* hardware configuration
> change
> 4) That calling remove_
> *has* set a session configuration results in the base configuration getting
> applied when the client becomes focused.
Good idea, I was thinking about doing some of these tests but ... wasnt sure.
I also wanted to write some unit test which matched the set session config but theres no accessing point to the config_map[]. Soo I think EXEPCT_CALLS(_) are still fine. Plus these other tests.