Merge lp:~alan-griffiths/mir/fix-Surface-hierarchy-make-SessionContainer-private into lp:mir
- fix-Surface-hierarchy-make-SessionContainer-private
- Merge into development-branch
Status: | Merged |
---|---|
Approved by: | Daniel van Vugt |
Approved revision: | no longer in the source branch. |
Merged at revision: | 1227 |
Proposed branch: | lp:~alan-griffiths/mir/fix-Surface-hierarchy-make-SessionContainer-private |
Merge into: | lp:mir |
Diff against target: |
547 lines (+68/-74) 24 files modified
examples/demo-shell/demo_shell.cpp (+0/-1) include/server/mir/default_server_configuration.h (+1/-0) include/server/mir/frontend/shell.h (+2/-2) include/server/mir/shell/session_manager.h (+1/-9) src/server/frontend/CMakeLists.txt (+0/-1) src/server/frontend/default_configuration.cpp (+4/-23) src/server/frontend/published_socket_connector.cpp (+5/-5) src/server/frontend/published_socket_connector.h (+3/-3) src/server/shell/CMakeLists.txt (+1/-0) src/server/shell/default_configuration.cpp (+28/-1) src/server/shell/default_session_container.cpp (+0/-1) src/server/shell/default_session_container.h (+1/-1) src/server/shell/global_event_sender.cpp (+5/-6) src/server/shell/global_event_sender.h (+7/-9) src/server/shell/mediating_display_changer.cpp (+1/-1) src/server/shell/session_manager.cpp (+1/-1) tests/acceptance-tests/test_client_input.cpp (+1/-1) tests/acceptance-tests/test_display_configuration.cpp (+1/-1) tests/acceptance-tests/test_focus_selection.cpp (+1/-1) tests/integration-tests/test_display_info.cpp (+0/-1) tests/unit-tests/frontend/CMakeLists.txt (+0/-1) tests/unit-tests/shell/CMakeLists.txt (+1/-0) tests/unit-tests/shell/test_global_event_sender.cpp (+3/-4) tests/unit-tests/shell/test_mediating_display_changer.cpp (+1/-1) |
To merge this branch: | bzr merge lp:~alan-griffiths/mir/fix-Surface-hierarchy-make-SessionContainer-private |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel van Vugt | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Alexandros Frantzis (community) | Approve | ||
Review via email: mp+194908@code.launchpad.net |
Commit message
shell: don't publish SurfacesContainer - it can be private to shell.
Description of the change
shell: don't publish SurfacesContainer - it can be private to shell.
This MP disentangles SurfacesContainer from frontend, and makes it private to shell.
It and much of the code that uses it (default_
NB this currently breaks unity-system-
Kevin DuBois (kdub) wrote : | # |
Alan Griffiths (alan-griffiths) wrote : | # |
> the_for_
> the_force_
> with....
It is a funny name for a funny abstraction. It is hard to see why the Connector should have responsibility for calling into the data model like this. In practice, the connector owns the threads that must be joined (and therefore first unblocked) and I can't immediately think of a better approach.
For example: Keeping thing within "frontend" the SessionCreator tracks SocketSessions and these own MessageProcessors (implemented as ProtobufMessage
Alexandros Frantzis (afrantzis) wrote : | # |
Looks good.
> the_for_
> the_force_
I think the_force_
are a bit more straightforward, but not a blocker.
Alan Griffiths (alan-griffiths) wrote : | # |
> Looks good.
>
> > the_for_
> > the_force_
> up with....
>
> I think the_force_
> the_force_
> are a bit more straightforward, but not a blocker.
I'm willing to be outvoted but I don't think these names are improvements:
1. These suggestions breaks up the "force_
2. "the_force_
Daniel van Vugt (vanvugt) wrote : | # |
I like the idea. But I think there comes a point where wordiness is a significant hurdle to readability:
129 + auto const& force_requests_
189 +mir::DefaultSe
Remember people see and read words as singular symbols, not looking at individual letters. If the symbol is too complex to recognize without looking at individual letters, then it's not really readable.
Daniel van Vugt (vanvugt) wrote : | # |
In the context of programming, it's the entire identifier (all words together) that needs to be recognizable as a single symbol. Not just the individual words within it.
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1227
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Daniel van Vugt (vanvugt) wrote : | # |
Yep, better thanks.
I find it strange to be returning a function from a function, and suspect a better design is possible. But won't pause to try and redesign existing semantics.
Preview Diff
1 | === modified file 'examples/demo-shell/demo_shell.cpp' |
2 | --- examples/demo-shell/demo_shell.cpp 2013-11-04 05:59:29 +0000 |
3 | +++ examples/demo-shell/demo_shell.cpp 2013-11-15 09:55:09 +0000 |
4 | @@ -24,7 +24,6 @@ |
5 | |
6 | #include "mir/run_mir.h" |
7 | #include "mir/report_exception.h" |
8 | -#include "mir/shell/session_container.h" |
9 | #include "mir/graphics/display.h" |
10 | #include "mir/input/composite_event_filter.h" |
11 | |
12 | |
13 | === modified file 'include/server/mir/default_server_configuration.h' |
14 | --- include/server/mir/default_server_configuration.h 2013-11-12 11:07:59 +0000 |
15 | +++ include/server/mir/default_server_configuration.h 2013-11-15 09:55:09 +0000 |
16 | @@ -312,6 +312,7 @@ |
17 | std::shared_ptr<input::NestedInputRelay> the_nested_input_relay(); |
18 | std::shared_ptr<surfaces::SurfaceBuilder> the_surface_builder(); |
19 | std::shared_ptr<surfaces::SurfaceController> the_surface_controller(); |
20 | + std::function<void()> force_threads_to_unblock_callback(); |
21 | }; |
22 | } |
23 | |
24 | |
25 | === modified file 'include/server/mir/frontend/shell.h' |
26 | --- include/server/mir/frontend/shell.h 2013-08-28 03:41:48 +0000 |
27 | +++ include/server/mir/frontend/shell.h 2013-11-15 09:55:09 +0000 |
28 | @@ -36,7 +36,7 @@ |
29 | class Shell |
30 | { |
31 | public: |
32 | - virtual ~Shell() {} |
33 | + virtual ~Shell() = default; |
34 | |
35 | virtual std::shared_ptr<Session> open_session( |
36 | std::string const& name, std::shared_ptr<EventSink> const& sink) = 0; |
37 | @@ -44,7 +44,7 @@ |
38 | |
39 | virtual SurfaceId create_surface_for(std::shared_ptr<Session> const& session, |
40 | shell::SurfaceCreationParameters const& params) = 0; |
41 | - |
42 | + |
43 | virtual void handle_surface_created(std::shared_ptr<Session> const& session) = 0; |
44 | |
45 | protected: |
46 | |
47 | === modified file 'include/server/mir/shell/session_manager.h' |
48 | --- include/server/mir/shell/session_manager.h 2013-11-07 23:20:58 +0000 |
49 | +++ include/server/mir/shell/session_manager.h 2013-11-15 09:55:09 +0000 |
50 | @@ -29,23 +29,15 @@ |
51 | |
52 | namespace mir |
53 | { |
54 | - |
55 | -namespace frontend |
56 | -{ |
57 | -class EventSink; |
58 | -} |
59 | /// Management of sessions and surfaces |
60 | namespace shell |
61 | { |
62 | class SurfaceFactory; |
63 | class SessionContainer; |
64 | class FocusSetter; |
65 | -class Session; |
66 | -class InputRegistrar; |
67 | class SnapshotStrategy; |
68 | class SessionEventSink; |
69 | class SessionListener; |
70 | -struct SurfaceCreationParameters; |
71 | |
72 | // TODO make private to shell |
73 | // This first needs unity-mir to be updated to use FocusController |
74 | @@ -71,7 +63,7 @@ |
75 | void focus_next(); |
76 | std::weak_ptr<Session> focussed_application() const; |
77 | void set_focus_to(std::shared_ptr<Session> const& focus); |
78 | - |
79 | + |
80 | void handle_surface_created(std::shared_ptr<frontend::Session> const& session); |
81 | |
82 | protected: |
83 | |
84 | === modified file 'src/server/frontend/CMakeLists.txt' |
85 | --- src/server/frontend/CMakeLists.txt 2013-11-04 05:59:29 +0000 |
86 | +++ src/server/frontend/CMakeLists.txt 2013-11-15 09:55:09 +0000 |
87 | @@ -8,7 +8,6 @@ |
88 | protobuf_message_processor.cpp |
89 | protobuf_buffer_packer.cpp |
90 | null_message_processor.cpp |
91 | - global_event_sender.cpp |
92 | published_socket_connector.cpp |
93 | protobuf_session_creator.cpp |
94 | socket_session.cpp |
95 | |
96 | === modified file 'src/server/frontend/default_configuration.cpp' |
97 | --- src/server/frontend/default_configuration.cpp 2013-11-04 05:59:29 +0000 |
98 | +++ src/server/frontend/default_configuration.cpp 2013-11-15 09:55:09 +0000 |
99 | @@ -19,7 +19,6 @@ |
100 | #include "mir/default_server_configuration.h" |
101 | |
102 | #include "resource_cache.h" |
103 | -#include "global_event_sender.h" |
104 | #include "protobuf_ipc_factory.h" |
105 | #include "protobuf_session_creator.h" |
106 | #include "published_socket_connector.h" |
107 | @@ -27,8 +26,6 @@ |
108 | #include "unauthorized_display_changer.h" |
109 | |
110 | #include "mir/options/option.h" |
111 | -#include "mir/shell/session_container.h" |
112 | -#include "mir/shell/session.h" |
113 | |
114 | namespace mf = mir::frontend; |
115 | namespace mg = mir::graphics; |
116 | @@ -121,21 +118,15 @@ |
117 | { |
118 | auto const threads = the_options()->get(frontend_threads, |
119 | default_ipc_threads); |
120 | - auto shell_sessions = the_shell_session_container(); |
121 | - auto const& force_requests_to_complete = [shell_sessions] |
122 | - { |
123 | - shell_sessions->for_each([](std::shared_ptr<msh::Session> const& session) |
124 | - { |
125 | - session->force_requests_to_complete(); |
126 | - }); |
127 | - }; |
128 | + |
129 | + auto const& force_threads_to_unblock = force_threads_to_unblock_callback(); |
130 | |
131 | if (the_options()->is_set(no_server_socket_opt)) |
132 | { |
133 | return std::make_shared<mf::BasicConnector>( |
134 | the_session_creator(), |
135 | threads, |
136 | - force_requests_to_complete, |
137 | + force_threads_to_unblock, |
138 | the_connector_report()); |
139 | } |
140 | else |
141 | @@ -144,22 +135,12 @@ |
142 | the_socket_file(), |
143 | the_session_creator(), |
144 | threads, |
145 | - force_requests_to_complete, |
146 | + force_threads_to_unblock, |
147 | the_connector_report()); |
148 | } |
149 | }); |
150 | } |
151 | |
152 | -std::shared_ptr<mf::EventSink> |
153 | -mir::DefaultServerConfiguration::the_global_event_sink() |
154 | -{ |
155 | - return global_event_sink( |
156 | - [this]() |
157 | - { |
158 | - return std::make_shared<mf::GlobalEventSender>(the_shell_session_container()); |
159 | - }); |
160 | -} |
161 | - |
162 | std::shared_ptr<mir::frontend::ProtobufIpcFactory> |
163 | mir::DefaultServerConfiguration::the_ipc_factory( |
164 | std::shared_ptr<mf::Shell> const& shell, |
165 | |
166 | === modified file 'src/server/frontend/published_socket_connector.cpp' |
167 | --- src/server/frontend/published_socket_connector.cpp 2013-10-15 08:53:10 +0000 |
168 | +++ src/server/frontend/published_socket_connector.cpp 2013-11-15 09:55:09 +0000 |
169 | @@ -35,9 +35,9 @@ |
170 | const std::string& socket_file, |
171 | std::shared_ptr<SessionCreator> const& session_creator, |
172 | int threads, |
173 | - std::function<void()> const& force_requests_to_complete, |
174 | + std::function<void()> const& force_threads_to_unblock, |
175 | std::shared_ptr<ConnectorReport> const& report) |
176 | -: BasicConnector(session_creator, threads, force_requests_to_complete, report), |
177 | +: BasicConnector(session_creator, threads, force_threads_to_unblock, report), |
178 | socket_file(socket_file), |
179 | acceptor(io_service, socket_file) |
180 | { |
181 | @@ -83,11 +83,11 @@ |
182 | mf::BasicConnector::BasicConnector( |
183 | std::shared_ptr<SessionCreator> const& session_creator, |
184 | int threads, |
185 | - std::function<void()> const& force_requests_to_complete, |
186 | + std::function<void()> const& force_threads_to_unblock, |
187 | std::shared_ptr<ConnectorReport> const& report) |
188 | : report(report), |
189 | io_service_threads(threads), |
190 | - force_requests_to_complete(force_requests_to_complete), |
191 | + force_threads_to_unblock(force_threads_to_unblock), |
192 | session_creator{session_creator} |
193 | { |
194 | } |
195 | @@ -126,7 +126,7 @@ |
196 | * Ensure that any pending requests will complete (i.e., that they |
197 | * will not block indefinitely waiting for a resource from the server) |
198 | */ |
199 | - force_requests_to_complete(); |
200 | + force_threads_to_unblock(); |
201 | |
202 | report->stopping_threads(io_service_threads.size()); |
203 | |
204 | |
205 | === modified file 'src/server/frontend/published_socket_connector.h' |
206 | --- src/server/frontend/published_socket_connector.h 2013-10-15 08:53:10 +0000 |
207 | +++ src/server/frontend/published_socket_connector.h 2013-11-15 09:55:09 +0000 |
208 | @@ -50,7 +50,7 @@ |
209 | explicit BasicConnector( |
210 | std::shared_ptr<SessionCreator> const& session_creator, |
211 | int threads, |
212 | - std::function<void()> const& force_requests_to_complete, |
213 | + std::function<void()> const& force_threads_to_unblock, |
214 | std::shared_ptr<ConnectorReport> const& report); |
215 | ~BasicConnector() noexcept; |
216 | void start() override; |
217 | @@ -66,7 +66,7 @@ |
218 | |
219 | private: |
220 | std::vector<std::thread> io_service_threads; |
221 | - std::function<void()> const force_requests_to_complete; |
222 | + std::function<void()> const force_threads_to_unblock; |
223 | std::shared_ptr<SessionCreator> const session_creator; |
224 | }; |
225 | |
226 | @@ -78,7 +78,7 @@ |
227 | const std::string& socket_file, |
228 | std::shared_ptr<SessionCreator> const& session_creator, |
229 | int threads, |
230 | - std::function<void()> const& force_requests_to_complete, |
231 | + std::function<void()> const& force_threads_to_unblock, |
232 | std::shared_ptr<ConnectorReport> const& report); |
233 | ~PublishedSocketConnector() noexcept; |
234 | |
235 | |
236 | === modified file 'src/server/shell/CMakeLists.txt' |
237 | --- src/server/shell/CMakeLists.txt 2013-11-08 18:56:58 +0000 |
238 | +++ src/server/shell/CMakeLists.txt 2013-11-15 09:55:09 +0000 |
239 | @@ -10,6 +10,7 @@ |
240 | surface_creation_parameters.cpp |
241 | threaded_snapshot_strategy.cpp |
242 | gl_pixel_buffer.cpp |
243 | + global_event_sender.cpp |
244 | graphics_display_layout.cpp |
245 | mediating_display_changer.cpp |
246 | broadcasting_session_event_sink.cpp |
247 | |
248 | === modified file 'src/server/shell/default_configuration.cpp' |
249 | --- src/server/shell/default_configuration.cpp 2013-11-08 19:03:12 +0000 |
250 | +++ src/server/shell/default_configuration.cpp 2013-11-15 09:55:09 +0000 |
251 | @@ -23,11 +23,15 @@ |
252 | #include "default_focus_mechanism.h" |
253 | #include "default_session_container.h" |
254 | #include "gl_pixel_buffer.h" |
255 | +#include "global_event_sender.h" |
256 | #include "graphics_display_layout.h" |
257 | #include "mediating_display_changer.h" |
258 | #include "organising_surface_factory.h" |
259 | +#include "threaded_snapshot_strategy.h" |
260 | + |
261 | +#include "session_container.h" |
262 | #include "mir/shell/session_manager.h" |
263 | -#include "threaded_snapshot_strategy.h" |
264 | +#include "mir/shell/session.h" |
265 | |
266 | #include "mir/graphics/display.h" |
267 | #include "mir/graphics/gl_context.h" |
268 | @@ -187,3 +191,26 @@ |
269 | the_shell_pixel_buffer()); |
270 | }); |
271 | } |
272 | + |
273 | +std::function<void()> |
274 | +mir::DefaultServerConfiguration::force_threads_to_unblock_callback() |
275 | +{ |
276 | + auto shell_sessions = the_shell_session_container(); |
277 | + return [shell_sessions] |
278 | + { |
279 | + shell_sessions->for_each([](std::shared_ptr<msh::Session> const& session) |
280 | + { |
281 | + session->force_requests_to_complete(); |
282 | + }); |
283 | + }; |
284 | +} |
285 | + |
286 | +std::shared_ptr<mf::EventSink> |
287 | +mir::DefaultServerConfiguration::the_global_event_sink() |
288 | +{ |
289 | + return global_event_sink( |
290 | + [this]() |
291 | + { |
292 | + return std::make_shared<msh::GlobalEventSender>(the_shell_session_container()); |
293 | + }); |
294 | +} |
295 | |
296 | === modified file 'src/server/shell/default_session_container.cpp' |
297 | --- src/server/shell/default_session_container.cpp 2013-11-07 23:20:58 +0000 |
298 | +++ src/server/shell/default_session_container.cpp 2013-11-15 09:55:09 +0000 |
299 | @@ -17,7 +17,6 @@ |
300 | */ |
301 | |
302 | #include "default_session_container.h" |
303 | -#include "mir/shell/session.h" |
304 | |
305 | #include <boost/throw_exception.hpp> |
306 | |
307 | |
308 | === modified file 'src/server/shell/default_session_container.h' |
309 | --- src/server/shell/default_session_container.h 2013-11-07 23:20:58 +0000 |
310 | +++ src/server/shell/default_session_container.h 2013-11-15 09:55:09 +0000 |
311 | @@ -23,7 +23,7 @@ |
312 | #include <memory> |
313 | #include <mutex> |
314 | |
315 | -#include "mir/shell/session_container.h" |
316 | +#include "session_container.h" |
317 | |
318 | namespace mir |
319 | { |
320 | |
321 | === renamed file 'src/server/frontend/global_event_sender.cpp' => 'src/server/shell/global_event_sender.cpp' |
322 | --- src/server/frontend/global_event_sender.cpp 2013-10-24 14:33:46 +0000 |
323 | +++ src/server/shell/global_event_sender.cpp 2013-11-15 09:55:09 +0000 |
324 | @@ -17,29 +17,28 @@ |
325 | */ |
326 | |
327 | #include "global_event_sender.h" |
328 | -#include "mir/shell/session_container.h" |
329 | +#include "session_container.h" |
330 | #include "mir/shell/session.h" |
331 | |
332 | -namespace mf=mir::frontend; |
333 | namespace mg=mir::graphics; |
334 | namespace msh=mir::shell; |
335 | |
336 | -mf::GlobalEventSender::GlobalEventSender(std::shared_ptr<shell::SessionContainer> const& session_container) |
337 | +msh::GlobalEventSender::GlobalEventSender(std::shared_ptr<SessionContainer> const& session_container) |
338 | : sessions(session_container) |
339 | { |
340 | } |
341 | |
342 | -void mf::GlobalEventSender::handle_event(MirEvent const&) |
343 | +void msh::GlobalEventSender::handle_event(MirEvent const&) |
344 | { |
345 | //TODO, no driving test cases, although messages like 'server shutdown' could go here |
346 | } |
347 | |
348 | -void mf::GlobalEventSender::handle_lifecycle_event(MirLifecycleState) |
349 | +void msh::GlobalEventSender::handle_lifecycle_event(MirLifecycleState) |
350 | { |
351 | // Lifecycle events are per application session, never global |
352 | } |
353 | |
354 | -void mf::GlobalEventSender::handle_display_config_change(mg::DisplayConfiguration const& config) |
355 | +void msh::GlobalEventSender::handle_display_config_change(mg::DisplayConfiguration const& config) |
356 | { |
357 | sessions->for_each([&config](std::shared_ptr<msh::Session> const& session) |
358 | { |
359 | |
360 | === renamed file 'src/server/frontend/global_event_sender.h' => 'src/server/shell/global_event_sender.h' |
361 | --- src/server/frontend/global_event_sender.h 2013-10-24 14:33:46 +0000 |
362 | +++ src/server/shell/global_event_sender.h 2013-11-15 09:55:09 +0000 |
363 | @@ -16,8 +16,8 @@ |
364 | * Authored by: Kevin DuBois <kevin.dubois@canonical.com> |
365 | */ |
366 | |
367 | -#ifndef MIR_FRONTEND_GLOBAL_EVENT_SENDER_H_ |
368 | -#define MIR_FRONTEND_GLOBAL_EVENT_SENDER_H_ |
369 | +#ifndef MIR_SHELL_GLOBAL_EVENT_SENDER_H_ |
370 | +#define MIR_SHELL_GLOBAL_EVENT_SENDER_H_ |
371 | |
372 | #include "mir/frontend/event_sink.h" |
373 | #include <memory> |
374 | @@ -27,22 +27,20 @@ |
375 | namespace shell |
376 | { |
377 | class SessionContainer; |
378 | -} |
379 | -namespace frontend |
380 | -{ |
381 | -class GlobalEventSender : public EventSink |
382 | + |
383 | +class GlobalEventSender : public frontend::EventSink |
384 | { |
385 | public: |
386 | - GlobalEventSender(std::shared_ptr<shell::SessionContainer> const&); |
387 | + GlobalEventSender(std::shared_ptr<SessionContainer> const&); |
388 | |
389 | void handle_event(MirEvent const& e); |
390 | void handle_lifecycle_event(MirLifecycleState state); |
391 | void handle_display_config_change(graphics::DisplayConfiguration const& config); |
392 | |
393 | private: |
394 | - std::shared_ptr<shell::SessionContainer> const sessions; |
395 | + std::shared_ptr<SessionContainer> const sessions; |
396 | }; |
397 | } |
398 | } |
399 | |
400 | -#endif /* MIR_FRONTEND_GLOBAL_EVENT_SENDER_H_ */ |
401 | +#endif /* MIR_SHELL_GLOBAL_EVENT_SENDER_H_ */ |
402 | |
403 | === modified file 'src/server/shell/mediating_display_changer.cpp' |
404 | --- src/server/shell/mediating_display_changer.cpp 2013-11-04 05:59:29 +0000 |
405 | +++ src/server/shell/mediating_display_changer.cpp 2013-11-15 09:55:09 +0000 |
406 | @@ -17,7 +17,7 @@ |
407 | */ |
408 | |
409 | #include "mediating_display_changer.h" |
410 | -#include "mir/shell/session_container.h" |
411 | +#include "session_container.h" |
412 | #include "mir/shell/session.h" |
413 | #include "session_event_handler_register.h" |
414 | #include "mir/graphics/display.h" |
415 | |
416 | === renamed file 'include/server/mir/shell/session_container.h' => 'src/server/shell/session_container.h' |
417 | === modified file 'src/server/shell/session_manager.cpp' |
418 | --- src/server/shell/session_manager.cpp 2013-11-14 13:42:28 +0000 |
419 | +++ src/server/shell/session_manager.cpp 2013-11-15 09:55:09 +0000 |
420 | @@ -18,7 +18,7 @@ |
421 | |
422 | #include "mir/shell/session_manager.h" |
423 | #include "mir/shell/application_session.h" |
424 | -#include "mir/shell/session_container.h" |
425 | +#include "session_container.h" |
426 | #include "mir/shell/surface_factory.h" |
427 | #include "mir/shell/focus_setter.h" |
428 | #include "mir/shell/session.h" |
429 | |
430 | === modified file 'tests/acceptance-tests/test_client_input.cpp' |
431 | --- tests/acceptance-tests/test_client_input.cpp 2013-11-11 17:07:09 +0000 |
432 | +++ tests/acceptance-tests/test_client_input.cpp 2013-11-15 09:55:09 +0000 |
433 | @@ -21,7 +21,7 @@ |
434 | #include "mir/shell/placement_strategy.h" |
435 | #include "mir/shell/surface_factory.h" |
436 | #include "mir/shell/surface.h" |
437 | -#include "mir/shell/session_container.h" |
438 | +#include "src/server/shell/session_container.h" |
439 | #include "mir/shell/session.h" |
440 | #include "src/server/surfaces/surface_controller.h" |
441 | #include "src/server/surfaces/surface_stack_model.h" |
442 | |
443 | === modified file 'tests/acceptance-tests/test_display_configuration.cpp' |
444 | --- tests/acceptance-tests/test_display_configuration.cpp 2013-11-04 13:39:27 +0000 |
445 | +++ tests/acceptance-tests/test_display_configuration.cpp 2013-11-15 09:55:09 +0000 |
446 | @@ -19,7 +19,7 @@ |
447 | |
448 | #include "mir/frontend/session_authorizer.h" |
449 | #include "mir/graphics/event_handler_register.h" |
450 | -#include "src/server/frontend/global_event_sender.h" |
451 | +#include "src/server/shell/global_event_sender.h" |
452 | |
453 | #include "mir_test_framework/display_server_test_fixture.h" |
454 | #include "mir_test_framework/cross_process_sync.h" |
455 | |
456 | === modified file 'tests/acceptance-tests/test_focus_selection.cpp' |
457 | --- tests/acceptance-tests/test_focus_selection.cpp 2013-11-12 02:30:22 +0000 |
458 | +++ tests/acceptance-tests/test_focus_selection.cpp 2013-11-15 09:55:09 +0000 |
459 | @@ -18,7 +18,7 @@ |
460 | |
461 | #include "mir_toolkit/mir_client_library.h" |
462 | |
463 | -#include "mir/shell/session_container.h" |
464 | +#include "src/server/shell/session_container.h" |
465 | #include "src/server/shell/consuming_placement_strategy.h" |
466 | #include "src/server/shell/organising_surface_factory.h" |
467 | #include "mir/shell/session_manager.h" |
468 | |
469 | === modified file 'tests/integration-tests/test_display_info.cpp' |
470 | --- tests/integration-tests/test_display_info.cpp 2013-11-04 13:58:32 +0000 |
471 | +++ tests/integration-tests/test_display_info.cpp 2013-11-15 09:55:09 +0000 |
472 | @@ -22,7 +22,6 @@ |
473 | #include "src/server/frontend/protobuf_ipc_factory.h" |
474 | #include "src/server/frontend/resource_cache.h" |
475 | #include "src/server/frontend/session_mediator.h" |
476 | -#include "src/server/frontend/global_event_sender.h" |
477 | |
478 | #include "mir_test_framework/display_server_test_fixture.h" |
479 | #include "mir_test_framework/cross_process_sync.h" |
480 | |
481 | === modified file 'tests/unit-tests/frontend/CMakeLists.txt' |
482 | --- tests/unit-tests/frontend/CMakeLists.txt 2013-11-04 05:59:29 +0000 |
483 | +++ tests/unit-tests/frontend/CMakeLists.txt 2013-11-15 09:55:09 +0000 |
484 | @@ -9,7 +9,6 @@ |
485 | ${CMAKE_CURRENT_SOURCE_DIR}/test_session_mediator.cpp |
486 | ${CMAKE_CURRENT_SOURCE_DIR}/test_socket_session.cpp |
487 | ${CMAKE_CURRENT_SOURCE_DIR}/test_event_sender.cpp |
488 | - ${CMAKE_CURRENT_SOURCE_DIR}/test_global_event_sender.cpp |
489 | ${CMAKE_CURRENT_SOURCE_DIR}/test_unauthorized_display_changer.cpp |
490 | ) |
491 | |
492 | |
493 | === modified file 'tests/unit-tests/shell/CMakeLists.txt' |
494 | --- tests/unit-tests/shell/CMakeLists.txt 2013-11-08 18:56:58 +0000 |
495 | +++ tests/unit-tests/shell/CMakeLists.txt 2013-11-15 09:55:09 +0000 |
496 | @@ -7,6 +7,7 @@ |
497 | ${CMAKE_CURRENT_SOURCE_DIR}/test_organising_surface_factory.cpp |
498 | ${CMAKE_CURRENT_SOURCE_DIR}/test_threaded_snapshot_strategy.cpp |
499 | ${CMAKE_CURRENT_SOURCE_DIR}/test_gl_pixel_buffer.cpp |
500 | + ${CMAKE_CURRENT_SOURCE_DIR}/test_global_event_sender.cpp |
501 | ${CMAKE_CURRENT_SOURCE_DIR}/test_graphics_display_layout.cpp |
502 | ${CMAKE_CURRENT_SOURCE_DIR}/test_broadcasting_session_event_sink.cpp |
503 | ) |
504 | |
505 | === renamed file 'tests/unit-tests/frontend/test_global_event_sender.cpp' => 'tests/unit-tests/shell/test_global_event_sender.cpp' |
506 | --- tests/unit-tests/frontend/test_global_event_sender.cpp 2013-11-07 23:20:58 +0000 |
507 | +++ tests/unit-tests/shell/test_global_event_sender.cpp 2013-11-15 09:55:09 +0000 |
508 | @@ -16,8 +16,8 @@ |
509 | * Authored by: Kevin DuBois <kevin.dubois@canonical.com> |
510 | */ |
511 | |
512 | -#include "src/server/frontend/global_event_sender.h" |
513 | -#include "mir/shell/session_container.h" |
514 | +#include "src/server/shell/global_event_sender.h" |
515 | +#include "src/server/shell/session_container.h" |
516 | #include "mir_test_doubles/mock_frontend_surface.h" |
517 | #include "mir_test_doubles/mock_shell_session.h" |
518 | #include "mir_test_doubles/stub_display_configuration.h" |
519 | @@ -29,7 +29,6 @@ |
520 | namespace mt=mir::test; |
521 | namespace mtd=mir::test::doubles; |
522 | namespace msh=mir::shell; |
523 | -namespace mf=mir::frontend; |
524 | |
525 | namespace |
526 | { |
527 | @@ -55,7 +54,7 @@ |
528 | .Times(1) |
529 | .WillOnce(SaveArg<0>(&called_fn)); |
530 | |
531 | - mf::GlobalEventSender g_sender(mt::fake_shared(mock_storage)); |
532 | + msh::GlobalEventSender g_sender(mt::fake_shared(mock_storage)); |
533 | |
534 | mtd::StubDisplayConfig stub_display_config; |
535 | g_sender.handle_display_config_change(stub_display_config); |
536 | |
537 | === modified file 'tests/unit-tests/shell/test_mediating_display_changer.cpp' |
538 | --- tests/unit-tests/shell/test_mediating_display_changer.cpp 2013-11-04 05:59:29 +0000 |
539 | +++ tests/unit-tests/shell/test_mediating_display_changer.cpp 2013-11-15 09:55:09 +0000 |
540 | @@ -17,7 +17,7 @@ |
541 | */ |
542 | |
543 | #include "src/server/shell/mediating_display_changer.h" |
544 | -#include "mir/shell/session_container.h" |
545 | +#include "src/server/shell/session_container.h" |
546 | #include "mir/graphics/display_configuration_policy.h" |
547 | #include "src/server/shell/broadcasting_session_event_sink.h" |
548 |
overall looks okay. I agree with "It and much of the code that uses it (default_ session_ container. cpp, global_ event_sender. cpp, mediating_ display_ changer. cpp and session_ manager. cpp) probably belong in surfaces. "
the_for_ all_sessions_ force_requests_ to_complete_ functor is a funny name... the_force_ all_requests_ to_complete_ functor( ) was the only name I could come up with....