Merge lp://staging/~alan-griffiths/mir/surface-states-simplification into lp://staging/~mir-team/mir/trunk
Proposed by
Alan Griffiths
Status: | Merged |
---|---|
Approved by: | Robert Ancell |
Approved revision: | no longer in the source branch. |
Merged at revision: | 636 |
Proposed branch: | lp://staging/~alan-griffiths/mir/surface-states-simplification |
Merge into: | lp://staging/~mir-team/mir/trunk |
Prerequisite: | lp://staging/~vanvugt/mir/surface-states |
Diff against target: |
1924 lines (+334/-253) 62 files modified
examples/demo-inprocess-egl/inprocess_egl_client.cpp (+1/-1) include/server/mir/frontend/protobuf_ipc_factory.h (+4/-2) include/server/mir/frontend/session.h (+0/-3) include/server/mir/frontend/session_mediator.h (+5/-3) include/server/mir/frontend/shell.h (+5/-2) include/server/mir/shell/application_session.h (+11/-5) include/server/mir/shell/organising_surface_factory.h (+4/-1) include/server/mir/shell/session_manager.h (+1/-1) include/server/mir/shell/surface.h (+13/-7) include/server/mir/shell/surface_factory.h (+9/-1) include/server/mir/shell/surface_source.h (+4/-1) include/shared/mir/events/event_sink.h (+6/-5) include/test/mir_test_doubles/mock_session.h (+0/-2) include/test/mir_test_doubles/mock_shell.h (+1/-1) include/test/mir_test_doubles/mock_surface_factory.h (+4/-1) include/test/mir_test_doubles/stub_ipc_factory.h (+1/-1) include/test/mir_test_doubles/stub_session.h (+1/-1) include/test/mir_test_doubles/stub_shell.h (+1/-1) src/client/make_rpc_channel.h (+2/-2) src/client/make_socket_rpc_channel.cpp (+1/-1) src/client/mir_basic_rpc_channel.cpp (+1/-3) src/client/mir_basic_rpc_channel.h (+6/-0) src/client/mir_client_library.cpp (+9/-13) src/client/mir_connection.cpp (+2/-1) src/client/mir_connection.h (+5/-4) src/client/mir_socket_rpc_channel.cpp (+32/-33) src/client/mir_socket_rpc_channel.h (+4/-4) src/server/CMakeLists.txt (+0/-1) src/server/default_server_configuration.cpp (+2/-1) src/server/frontend/CMakeLists.txt (+1/-0) src/server/frontend/event_pipe.cpp (+6/-7) src/server/frontend/event_pipe.h (+12/-10) src/server/frontend/protobuf_message_processor.cpp (+3/-1) src/server/frontend/protobuf_message_processor.h (+2/-2) src/server/frontend/protobuf_socket_communicator.cpp (+4/-5) src/server/frontend/session_mediator.cpp (+2/-3) src/server/shell/application_session.cpp (+14/-12) src/server/shell/organising_surface_factory.cpp (+5/-2) src/server/shell/session_manager.cpp (+4/-2) src/server/shell/surface.cpp (+19/-12) src/server/shell/surface_source.cpp (+7/-2) src/shared/protobuf/mir_protobuf_wire.proto (+3/-1) tests/acceptance-tests/test_focus_management_api.cpp (+4/-4) tests/behavior-tests/session_management_context.cpp (+8/-4) tests/integration-tests/cucumber/test_session_management_context.cpp (+3/-3) tests/integration-tests/shell/test_session_manager.cpp (+8/-7) tests/unit-tests/CMakeLists.txt (+0/-1) tests/unit-tests/client/test_client_mir_surface.cpp (+1/-1) tests/unit-tests/client/test_mir_connection.cpp (+3/-1) tests/unit-tests/event/CMakeLists.txt (+0/-5) tests/unit-tests/frontend/CMakeLists.txt (+1/-0) tests/unit-tests/frontend/test_event_pipe.cpp (+14/-11) tests/unit-tests/frontend/test_session_mediator.cpp (+9/-5) tests/unit-tests/frontend/test_session_mediator_android.cpp (+9/-3) tests/unit-tests/frontend/test_session_mediator_gbm.cpp (+9/-3) tests/unit-tests/shell/test_application_session.cpp (+10/-9) tests/unit-tests/shell/test_organising_surface_factory.cpp (+6/-5) tests/unit-tests/shell/test_registration_order_focus_sequence.cpp (+11/-10) tests/unit-tests/shell/test_session_manager.cpp (+16/-15) tests/unit-tests/shell/test_single_visibility_focus_mechanism.cpp (+0/-1) tests/unit-tests/shell/test_surface.cpp (+2/-0) tests/unit-tests/shell/test_the_session_container_implementation.cpp (+3/-4) |
To merge this branch: | bzr merge lp://staging/~alan-griffiths/mir/surface-states-simplification |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Chris Halse Rogers | Approve | ||
Robert Ancell | Approve | ||
Kevin DuBois (community) | Approve | ||
Daniel van Vugt | Pending | ||
Review via email:
|
This proposal supersedes a proposal from 2013-04-23.
Commit message
frontend, shell, tests: surface-states updated to avoid supplying dependencies through public member functions.
Description of the change
frontend, shell, tests: surface-states updated to avoid supplying dependencies through public member functions.
Where possible, dependencies should be supplied as constructor arguments and held as const members.
(This required updates to a few factory interfaces to supply the dependencies.)
To post a comment you must log in.
Firstly, needs fixing: tests/shell/ test_applicatio n_session. cpp
Text conflict in tests/unit-
1 conflicts encountered.
Secondly, I disagree with the approach. There are no strong "dependencies" here. The information in question is all optional to the class receiving it, so should not be passed in constructors. The classes can function without event sinks or surface IDs. They will work as they already do. Only event emission would not happen. So it's optional relative to those classes, and therefore not something to enforce in the constructor.
Aside from anything else, the degree of coupling introduced here looks very high. It's always better to minimize coupling. You can't call it a simplification if coupling is increased and the diff is "+205/-148".