Mir

Merge lp:~alan-griffiths/mir/MVC-refactor-msh-Shell-hierarchy into lp:mir

Proposed by Alan Griffiths on 2015-01-29
Status: Merged
Approved by: Robert Carr on 2015-02-03
Approved revision: 2296
Merged at revision: 2284
Proposed branch: lp:~alan-griffiths/mir/MVC-refactor-msh-Shell-hierarchy
Merge into: lp:mir
Diff against target: 2334 lines (+681/-608)
31 files modified
examples/server_example_window_management.cpp (+1/-0)
include/server/mir/server.h (+14/-1)
include/server/mir/shell/abstract_shell.h (+116/-0)
include/server/mir/shell/shell.h (+2/-22)
include/server/mir/shell/shell_wrapper.h (+2/-3)
server-ABI-sha1sums (+4/-3)
src/server/scene/basic_surface.cpp (+2/-9)
src/server/scene/basic_surface.h (+0/-4)
src/server/scene/default_configuration.cpp (+0/-1)
src/server/scene/surface_allocator.cpp (+0/-3)
src/server/scene/surface_allocator.h (+0/-2)
src/server/server.cpp (+2/-0)
src/server/shell/CMakeLists.txt (+1/-0)
src/server/shell/abstract_shell.cpp (+197/-0)
src/server/shell/default_configuration.cpp (+2/-1)
src/server/shell/default_shell.cpp (+21/-134)
src/server/shell/default_shell.h (+9/-45)
src/server/shell/frontend_shell.cpp (+4/-2)
src/server/shell/shell_wrapper.cpp (+4/-5)
src/server/symbols.map (+243/-263)
tests/include/mir_test_doubles/mock_surface.h (+0/-1)
tests/integration-tests/surface_composition.cpp (+0/-6)
tests/integration-tests/test_default_shell.cpp (+51/-2)
tests/integration-tests/test_surface_stack_with_compositor.cpp (+0/-2)
tests/unit-tests/examples/test_demo_compositor.cpp (+0/-2)
tests/unit-tests/scene/test_basic_surface.cpp (+2/-49)
tests/unit-tests/scene/test_default_shell.cpp (+3/-1)
tests/unit-tests/scene/test_session_manager.cpp (+0/-3)
tests/unit-tests/scene/test_surface.cpp (+0/-4)
tests/unit-tests/scene/test_surface_impl.cpp (+1/-30)
tests/unit-tests/scene/test_surface_stack.cpp (+0/-10)
To merge this branch: bzr merge lp:~alan-griffiths/mir/MVC-refactor-msh-Shell-hierarchy
Reviewer Review Type Date Requested Status
Kevin DuBois (community) Approve on 2015-02-02
Robert Carr (community) Approve on 2015-02-02
Chris Halse Rogers 2015-01-29 Abstain on 2015-02-02
PS Jenkins bot continuous-integration Approve on 2015-01-30
Alexandros Frantzis (community) Approve on 2015-01-30
Review via email: mp+248030@code.launchpad.net

Commit Message

shell: refactor Shell hierarchy

This gives the classes a clearer role:

AbstractShell - this is a policy-less implementation of the Shell interface

DefaultShell - this adds window management policies to the AbstractShell (mostly by overriding methods to add pre- or post-processing). This is still configurable by established strategy classes (placement_strategy and surface_configurator).

Description of the Change

shell: refactor Shell hierarchy

This gives the classes a clearer role:

AbstractShell - this is a policy-less implementation of the Shell interface

DefaultShell - this adds window management policies to the AbstractShell (mostly by overriding methods to add pre- or post-processing). This is still configurable by established strategy classes (placement_strategy and surface_configurator).

Note:
These changes are driven by:

1. a desire to put all the window management together
2. experience spiking "compatibility branches" to USC and qtmir

To post a comment you must log in.
Chris Halse Rogers (raof) wrote :

So, I'm confused as to why we want a policy-less implementation of the Shell interface at all?

If the idea is to share common implementation then wouldn't a separate helper class that shell implementations can use be a more appropriate mechanism?

review: Needs Information
Alan Griffiths (alan-griffiths) wrote :

> So, I'm confused as to why we want a policy-less implementation of the Shell
> interface at all?
>
> If the idea is to share common implementation then wouldn't a separate helper
> class that shell implementations can use be a more appropriate mechanism?

I think we agree that it is a good idea to remove remove everything that isn't "policy" from DefaultShell and put all the policy there? The question them becomes one of how to do that without spurious restrictions on the policies that can be implemented through the public interface.

Having a separate helper class would mean that a shell implementor would need to forward or re-implement functions for which they don't wish to apply policy - either way leading to significant "boiler plate".

Ignoring for a moment the deficiencies of the programming language I think the ideal mechanism would be something AOP - where we provide a policy-less shell and the the policy is implemented with decorations like "on_entering(create_surface, [] (/*args*/) { /* policy code */ })". We could, of course, implement something like that using std::function and lambdas - but there are some use cases that are a little awkward (like forcing an early return).

Traditionally, C++ code has used "override and call the base method" to provide this sort of decoration and I feel it is a suitable solution here.

Alexandros Frantzis (afrantzis) wrote :

A slight concern:

133 + virtual void setting_focus_to(std::shared_ptr<scene::Surface> const& next_focus);
134 + virtual void setting_focus_to(std::shared_ptr<scene::Session> const& next_focus);

Unless one looks at the AbstractShell implementation, it's not apparent that these are called under lock. This may come as a surprise to shell writers and could lead to code with deadlocks. It would be good to document the caveats of overriding these functions.

Looks good otherwise.

review: Needs Fixing
Alexandros Frantzis (afrantzis) wrote :

Still OK.

review: Approve
Chris Halse Rogers (raof) wrote :

> Having a separate helper class would mean that a shell implementor would need
> to forward or re-implement functions for which they don't wish to apply policy
> - either way leading to significant "boiler plate".

I feel that, in this case, override-and-call-base-method will have comparable boiler plate, but with the added downside that the compiler doesn't warn you when you've failed to correctly call the base method.

You've done more work on the downstreams, so you've got a better idea of this, so I won't block.

(It vaguely looks like there might be two different worthwhile interfaces merged into Shell, but that's somewhat of a different thingy)

review: Abstain
Alan Griffiths (alan-griffiths) wrote :

> I feel that, in this case, override-and-call-base-method will have comparable
> boiler plate, but with the added downside that the compiler doesn't warn you
> when you've failed to correctly call the base method.

This can also happen with a "helper object" as there is no guarantee that the helper method is invoked.

It is a legitimate concern (and one that would be addressed by AOP if we had it in C++).

Alan Griffiths (alan-griffiths) wrote :

> You've done more work on the downstreams, so you've got a better idea of this,
> so I won't block.

Here's an example of downstream use:

lp:~alan-griffiths/qtmir/port-to-msh-Shell/+merge/247844

Robert Carr (robertcarr) wrote :

w.r.t. Chris's concerns and the abstract shell...I guess I hope this could dissapear

afaics it arises from a combination of two rolls in msh::Shell (preexisting of course)
there is both the factory role and the policy role still.

It seems like AbstractShell provides implementations for the factory roles and allows decoration to implement the policy. If these roles were split AbstractShell impl could dissapear. (e.g. create/destroy_surface belong to another interface and surface_created/surface_destroyed live on msh::Shell)

>> + attribute_set(*focussed_surface, mir_surface_attrib_state, state);

This line is making me think that attribute_set is looking weirder and weirder on SurfaceConfigurator and should just be part of the observer system.

Robert Carr (robertcarr) wrote :

Anyway LGTM :)

review: Approve
Alan Griffiths (alan-griffiths) wrote :

> >> + attribute_set(*focussed_surface, mir_surface_attrib_state, state);
>
> This line is making me think that attribute_set is looking weirder and weirder
> on SurfaceConfigurator and should just be part of the observer system.

If you look at the dependent branch (which just updates the example) this weird line goes away.

Alan Griffiths (alan-griffiths) wrote :

> It seems like AbstractShell provides implementations for the factory roles and
> allows decoration to implement the policy. If these roles were split
> AbstractShell impl could dissapear. (e.g. create/destroy_surface belong to
> another interface and surface_created/surface_destroyed live on msh::Shell)

Actually, for generic policy, you need both before_surface_created() (to vet and/or update the create parameters) and after_surface_created() (to react to the surface creation). I took the proposed approach as I think it easier to do this by wrapping.

As I said before:

"I think the ideal mechanism would be something AOP - where we provide a policy-less shell and the the policy is implemented with decorations like "on_entering(create_surface, [] (/*args*/) { /* policy code */ })". We could, of course, implement something like that using std::function and lambdas - but there are some use cases that are a little awkward (like forcing an early return)."

Kevin DuBois (kdub) wrote :

approve:
I think its a step forward, and the interface looks okay to me. The focus setting code still looks like it has more requirements that the other stuff the shell might want to do, something to clean later.

needs info:
Some of the symbols in the map file seem updated that aren't related to the interface changes (the one that stood out to me was mc::SceneElement). Are all the symbols.map changes hand-picked or autogenerated?

review: Needs Information
Alan Griffiths (alan-griffiths) wrote :

> needs info:
> Some of the symbols in the map file seem updated that aren't related to the
> interface changes (the one that stood out to me was mc::SceneElement). Are all
> the symbols.map changes hand-picked or autogenerated?

Yes, there are some overdue updates in the sysmols.map changes. They come from rerunning the script (the hand-crafted stuff is commented at the end of the file).

Kevin DuBois (kdub) wrote :

Okay, lgtm then, I guess I just picked out a few pre-existing problems in the autogenerated symbols.map

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'examples/server_example_window_management.cpp'
2--- examples/server_example_window_management.cpp 2015-01-26 18:57:21 +0000
3+++ examples/server_example_window_management.cpp 2015-01-30 14:41:53 +0000
4@@ -281,6 +281,7 @@
5 }
6
7 focussed_surface->configure(mir_surface_attrib_state, state);
8+ attribute_set(*focussed_surface, mir_surface_attrib_state, state);
9 }
10 }
11 }
12
13=== modified file 'include/server/mir/server.h'
14--- include/server/mir/server.h 2015-01-29 04:34:12 +0000
15+++ include/server/mir/server.h 2015-01-30 14:41:53 +0000
16@@ -33,7 +33,14 @@
17 namespace input { class CompositeEventFilter; class InputDispatcher; class CursorListener; class TouchVisualizer; }
18 namespace logging { class Logger; }
19 namespace options { class Option; }
20-namespace shell { class Shell; class FocusController; class DisplayLayout; class HostLifecycleEventListener; }
21+namespace shell
22+{
23+class DisplayLayout;
24+class FocusController;
25+class HostLifecycleEventListener;
26+class InputTargeter;
27+class Shell;
28+}
29 namespace scene
30 {
31 class PlacementStrategy;
32@@ -241,6 +248,9 @@
33 /// Sets an override functor for creating the session mediator report.
34 void override_the_session_mediator_report(Builder<frontend::SessionMediatorReport> const& session_mediator_builder);
35
36+ /// Sets an override functor for creating the shell.
37+ void override_the_shell(Builder<shell::Shell> const& wrapper);
38+
39 /// Sets an override functor for creating the surface configurator.
40 void override_the_surface_configurator(Builder<scene::SurfaceConfigurator> const& surface_configurator_builder);
41
42@@ -288,6 +298,9 @@
43 /// \return the graphics platform.
44 auto the_graphics_platform() const -> std::shared_ptr<graphics::Platform>;
45
46+ /// \return the input targeter.
47+ auto the_input_targeter() const -> std::shared_ptr<shell::InputTargeter>;
48+
49 /// \return the logger.
50 auto the_logger() const -> std::shared_ptr<logging::Logger>;
51
52
53=== added file 'include/server/mir/shell/abstract_shell.h'
54--- include/server/mir/shell/abstract_shell.h 1970-01-01 00:00:00 +0000
55+++ include/server/mir/shell/abstract_shell.h 2015-01-30 14:41:53 +0000
56@@ -0,0 +1,116 @@
57+/*
58+ * Copyright © 2015 Canonical Ltd.
59+ *
60+ * This program is free software: you can redistribute it and/or modify it
61+ * under the terms of the GNU General Public License version 3,
62+ * as published by the Free Software Foundation.
63+ *
64+ * This program is distributed in the hope that it will be useful,
65+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
66+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
67+ * GNU General Public License for more details.
68+ *
69+ * You should have received a copy of the GNU General Public License
70+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
71+ *
72+ * Authored By: Alan Griffiths <alan@octopull.co.uk>
73+ */
74+
75+#ifndef MIR_SHELL_ABSTRACT_SHELL_H_
76+#define MIR_SHELL_ABSTRACT_SHELL_H_
77+
78+#include "mir/shell/shell.h"
79+
80+#include <mutex>
81+
82+namespace mir
83+{
84+namespace shell
85+{
86+/// Minimal Shell implementation with none of the necessary window management logic
87+class AbstractShell : public virtual Shell
88+{
89+public:
90+ AbstractShell(
91+ std::shared_ptr<InputTargeter> const& input_targeter,
92+ std::shared_ptr<scene::SurfaceCoordinator> const& surface_coordinator,
93+ std::shared_ptr<scene::SessionCoordinator> const& session_coordinator,
94+ std::shared_ptr<scene::PromptSessionManager> const& prompt_session_manager);
95+
96+ ~AbstractShell() noexcept;
97+
98+ std::shared_ptr<scene::Session> open_session(
99+ pid_t client_pid,
100+ std::string const& name,
101+ std::shared_ptr<frontend::EventSink> const& sink) override;
102+
103+ void close_session(std::shared_ptr<scene::Session> const& session) override;
104+
105+ frontend::SurfaceId create_surface(std::shared_ptr<scene::Session> const& session, scene::SurfaceCreationParameters const& params) override;
106+
107+ void destroy_surface(std::shared_ptr<scene::Session> const& session, frontend::SurfaceId surface) override;
108+
109+ void handle_surface_created(std::shared_ptr<scene::Session> const& session) override;
110+
111+ int set_surface_attribute(
112+ std::shared_ptr<scene::Session> const& session,
113+ std::shared_ptr<scene::Surface> const& surface,
114+ MirSurfaceAttrib attrib,
115+ int value) override;
116+
117+ int get_surface_attribute(
118+ std::shared_ptr<scene::Surface> const& surface,
119+ MirSurfaceAttrib attrib) override;
120+
121+ std::shared_ptr<scene::PromptSession> start_prompt_session_for(
122+ std::shared_ptr<scene::Session> const& session,
123+ scene::PromptSessionCreationParameters const& params) override;
124+
125+ void add_prompt_provider_for(
126+ std::shared_ptr<scene::PromptSession> const& prompt_session,
127+ std::shared_ptr<scene::Session> const& session) override;
128+
129+ void stop_prompt_session(std::shared_ptr<scene::PromptSession> const& prompt_session) override;
130+
131+/** @name these come from FocusController
132+ * Focus changes are notified to the derived class via the private setting_focus_to()
133+ * functions.
134+ * \note I think the FocusController interface is unnecessary as:
135+ * 1. the functions are only meaningful in the context of implementing a Shell
136+ * 2. the implementation of these functions is Shell behaviour
137+ * Simply providing them as part of AbstractShell is probably adequate.
138+ * @{ */
139+ void focus_next() override;
140+
141+ std::weak_ptr<scene::Session> focussed_application() const override;
142+
143+ void set_focus_to(std::shared_ptr<scene::Session> const& focus) override;
144+/** @} */
145+
146+protected:
147+ std::shared_ptr<InputTargeter> const input_targeter;
148+ std::shared_ptr<scene::SurfaceCoordinator> const surface_coordinator;
149+ std::shared_ptr<scene::SessionCoordinator> const session_coordinator;
150+ std::shared_ptr<scene::PromptSessionManager> const prompt_session_manager;
151+
152+private:
153+/** @name callbacks from FocusController methods
154+ * These functions are called while the input focus is locked.
155+ * \warning DO NOT allow recursive calls to focus_next(), focussed_application() or set_focus_to()
156+ * as these will deadlock.
157+ * @{ */
158+ virtual void setting_focus_to(std::shared_ptr<scene::Surface> const& next_focus);
159+ virtual void setting_focus_to(std::shared_ptr<scene::Session> const& next_focus);
160+/** @} */
161+
162+ std::mutex mutable focus_mutex;
163+ std::weak_ptr<scene::Surface> focus_surface;
164+ std::weak_ptr<scene::Session> focus_session;
165+
166+ void set_focus_to_locked(std::unique_lock<std::mutex> const& lock, std::shared_ptr<scene::Surface> const& next_focus);
167+ void set_focus_to_locked(std::unique_lock<std::mutex> const& lock, std::shared_ptr<scene::Session> const& next_focus);
168+};
169+}
170+}
171+
172+#endif /* MIR_SHELL_ABSTRACT_SHELL_H_ */
173
174=== modified file 'include/server/mir/shell/shell.h'
175--- include/server/mir/shell/shell.h 2015-01-26 16:53:50 +0000
176+++ include/server/mir/shell/shell.h 2015-01-30 14:41:53 +0000
177@@ -76,35 +76,15 @@
178
179 virtual int set_surface_attribute(
180 std::shared_ptr<scene::Session> const& session,
181- frontend::SurfaceId surface_id,
182+ std::shared_ptr<scene::Surface> const& surface,
183 MirSurfaceAttrib attrib,
184 int value) = 0;
185
186 virtual int get_surface_attribute(
187- std::shared_ptr<scene::Session> const& session,
188- frontend::SurfaceId surface_id,
189+ std::shared_ptr<scene::Surface> const& surface,
190 MirSurfaceAttrib attrib) = 0;
191 /** @} */
192 };
193-
194-/// A placeholder for stuff all shells will want
195-class AbstractShell : public Shell
196-{
197-public:
198- AbstractShell(
199- std::shared_ptr<InputTargeter> const& input_targeter,
200- std::shared_ptr<scene::SurfaceCoordinator> const& surface_coordinator,
201- std::shared_ptr<scene::SessionCoordinator> const& session_coordinator,
202- std::shared_ptr<scene::PromptSessionManager> const& prompt_session_manager);
203-
204- ~AbstractShell() noexcept;
205-
206-protected:
207- std::shared_ptr<InputTargeter> const input_targeter;
208- std::shared_ptr<scene::SurfaceCoordinator> const surface_coordinator;
209- std::shared_ptr<scene::SessionCoordinator> const session_coordinator;
210- std::shared_ptr<scene::PromptSessionManager> const prompt_session_manager;
211-};
212 }
213 }
214
215
216=== modified file 'include/server/mir/shell/shell_wrapper.h'
217--- include/server/mir/shell/shell_wrapper.h 2015-01-28 12:02:41 +0000
218+++ include/server/mir/shell/shell_wrapper.h 2015-01-30 14:41:53 +0000
219@@ -61,13 +61,12 @@
220
221 int set_surface_attribute(
222 std::shared_ptr<scene::Session> const& session,
223- frontend::SurfaceId surface_id,
224+ std::shared_ptr<scene::Surface> const& surface,
225 MirSurfaceAttrib attrib,
226 int value) override;
227
228 int get_surface_attribute(
229- std::shared_ptr<scene::Session> const& session,
230- frontend::SurfaceId surface_id,
231+ std::shared_ptr<scene::Surface> const& surface,
232 MirSurfaceAttrib attrib) override;
233
234 protected:
235
236=== modified file 'server-ABI-sha1sums'
237--- server-ABI-sha1sums 2015-01-29 04:34:12 +0000
238+++ server-ABI-sha1sums 2015-01-30 14:41:53 +0000
239@@ -103,14 +103,15 @@
240 aceccc0bdeea5c90d6c5ea17ed4ce6b5dc1b0ed4 include/server/mir/scene/surface.h
241 587e22d751656ce2d9536afdf5659276ff9bbc46 include/server/mir/scene/surface_observer.h
242 7ef3e99901168cda296d74d05a979f47bf9c3ff1 include/server/mir/server_action_queue.h
243-f7c31027e803d28e6221e523d7fb679189b6e1a0 include/server/mir/server.h
244+82adb52457bf9caf913940e8eeddec4e116dd862 include/server/mir/server.h
245 86098b500339bfccd07a9bed8298f75a68b18f5c include/server/mir/server_status_listener.h
246+921f0ae41c50965da6317184fd06286697704a6f include/server/mir/shell/abstract_shell.h
247 860c04f32b60e680140148dc9dc2295de145b9c1 include/server/mir/shell/display_layout.h
248 217ee696afe779c1dc23e1f17e93eafca896a1a6 include/server/mir/shell/focus_controller.h
249 f8d415af54b4a477338fb9dbe20db01aa4544029 include/server/mir/shell/host_lifecycle_event_listener.h
250 4f50c37bb8e36a1aa4918af6aa01b0f032ed0984 include/server/mir/shell/input_targeter.h
251-455fbd79aa33d1a3fcf078c5e5b7a8575ee9eb8f include/server/mir/shell/shell.h
252-66140bd35f412fca4cb3eb58d890acecabeb333a include/server/mir/shell/shell_wrapper.h
253+9b567d3fc9a09fd3196fec2dad22ca967c45f442 include/server/mir/shell/shell.h
254+e4786cdcd111bd6270db25d40129c4e415cb4347 include/server/mir/shell/shell_wrapper.h
255 114cc8c0b12ee4fd78d86c8f3309546e4dc68c9f include/server/mir/terminate_with_current_exception.h
256 1b8c2a763c8f5f00b737c3a187db2304676f8076 include/server/mir/time/alarm.h
257 a134c7b86e9c3b191f1004abe7bbdceed8ac42ee include/server/mir/time/timer.h
258
259=== modified file 'src/server/scene/basic_surface.cpp'
260--- src/server/scene/basic_surface.cpp 2015-01-22 03:10:13 +0000
261+++ src/server/scene/basic_surface.cpp 2015-01-30 14:41:53 +0000
262@@ -27,7 +27,6 @@
263 #include "mir/graphics/buffer.h"
264
265 #include "mir/scene/scene_report.h"
266-#include "mir/scene/surface_configurator.h"
267
268 #include <boost/throw_exception.hpp>
269
270@@ -116,7 +115,6 @@
271 std::shared_ptr<mc::BufferStream> const& buffer_stream,
272 std::shared_ptr<mi::InputChannel> const& input_channel,
273 std::shared_ptr<input::InputSender> const& input_sender,
274- std::shared_ptr<SurfaceConfigurator> const& configurator,
275 std::shared_ptr<mg::CursorImage> const& cursor_image,
276 std::shared_ptr<SceneReport> const& report) :
277 surface_name(name),
278@@ -130,7 +128,6 @@
279 surface_buffer_stream(buffer_stream),
280 server_input_channel(input_channel),
281 input_sender(input_sender),
282- configurator(configurator),
283 cursor_image_(cursor_image),
284 report(report),
285 parent_(parent)
286@@ -145,12 +142,10 @@
287 std::shared_ptr<mc::BufferStream> const& buffer_stream,
288 std::shared_ptr<mi::InputChannel> const& input_channel,
289 std::shared_ptr<input::InputSender> const& input_sender,
290- std::shared_ptr<SurfaceConfigurator> const& configurator,
291 std::shared_ptr<mg::CursorImage> const& cursor_image,
292 std::shared_ptr<SceneReport> const& report) :
293 BasicSurface(name, rect, std::shared_ptr<Surface>{nullptr}, nonrectangular,buffer_stream,
294- input_channel, input_sender, configurator,
295- cursor_image, report)
296+ input_channel, input_sender, cursor_image, report)
297 {
298 }
299
300@@ -510,7 +505,7 @@
301
302 int ms::BasicSurface::configure(MirSurfaceAttrib attrib, int value)
303 {
304- int result = configurator->select_attribute_value(*this, attrib, value);
305+ int result = value;
306 switch (attrib)
307 {
308 case mir_surface_attrib_type:
309@@ -540,8 +535,6 @@
310 break;
311 }
312
313- configurator->attribute_set(*this, attrib, result);
314-
315 return result;
316 }
317
318
319=== modified file 'src/server/scene/basic_surface.h'
320--- src/server/scene/basic_surface.h 2015-01-22 03:10:13 +0000
321+++ src/server/scene/basic_surface.h 2015-01-30 14:41:53 +0000
322@@ -54,7 +54,6 @@
323 namespace scene
324 {
325 class SceneReport;
326-class SurfaceConfigurator;
327
328 class SurfaceObservers : public SurfaceObserver, BasicObservers<SurfaceObserver>
329 {
330@@ -85,7 +84,6 @@
331 std::shared_ptr<compositor::BufferStream> const& buffer_stream,
332 std::shared_ptr<input::InputChannel> const& input_channel,
333 std::shared_ptr<input::InputSender> const& sender,
334- std::shared_ptr<SurfaceConfigurator> const& configurator,
335 std::shared_ptr<graphics::CursorImage> const& cursor_image,
336 std::shared_ptr<SceneReport> const& report);
337
338@@ -97,7 +95,6 @@
339 std::shared_ptr<compositor::BufferStream> const& buffer_stream,
340 std::shared_ptr<input::InputChannel> const& input_channel,
341 std::shared_ptr<input::InputSender> const& sender,
342- std::shared_ptr<SurfaceConfigurator> const& configurator,
343 std::shared_ptr<graphics::CursorImage> const& cursor_image,
344 std::shared_ptr<SceneReport> const& report);
345
346@@ -188,7 +185,6 @@
347 std::shared_ptr<compositor::BufferStream> const surface_buffer_stream;
348 std::shared_ptr<input::InputChannel> const server_input_channel;
349 std::shared_ptr<input::InputSender> const input_sender;
350- std::shared_ptr<SurfaceConfigurator> const configurator;
351 std::shared_ptr<graphics::CursorImage> cursor_image_;
352 std::shared_ptr<SceneReport> const report;
353 std::weak_ptr<Surface> const parent_;
354
355=== modified file 'src/server/scene/default_configuration.cpp'
356--- src/server/scene/default_configuration.cpp 2015-01-29 04:34:12 +0000
357+++ src/server/scene/default_configuration.cpp 2015-01-30 14:41:53 +0000
358@@ -74,7 +74,6 @@
359 the_buffer_stream_factory(),
360 the_input_channel_factory(),
361 the_input_sender(),
362- the_surface_configurator(),
363 the_default_cursor_image(),
364 the_scene_report());
365 });
366
367=== modified file 'src/server/scene/surface_allocator.cpp'
368--- src/server/scene/surface_allocator.cpp 2015-01-22 03:10:13 +0000
369+++ src/server/scene/surface_allocator.cpp 2015-01-30 14:41:53 +0000
370@@ -39,13 +39,11 @@
371 std::shared_ptr<BufferStreamFactory> const& stream_factory,
372 std::shared_ptr<input::InputChannelFactory> const& input_factory,
373 std::shared_ptr<input::InputSender> const& input_sender,
374- std::shared_ptr<SurfaceConfigurator> const& configurator,
375 std::shared_ptr<mg::CursorImage> const& default_cursor_image,
376 std::shared_ptr<SceneReport> const& report) :
377 buffer_stream_factory(stream_factory),
378 input_factory(input_factory),
379 input_sender(input_sender),
380- configurator(configurator),
381 default_cursor_image(default_cursor_image),
382 report(report)
383 {
384@@ -69,7 +67,6 @@
385 buffer_stream,
386 input_channel,
387 input_sender,
388- configurator,
389 default_cursor_image,
390 report);
391
392
393=== modified file 'src/server/scene/surface_allocator.h'
394--- src/server/scene/surface_allocator.h 2015-01-14 06:39:13 +0000
395+++ src/server/scene/surface_allocator.h 2015-01-30 14:41:53 +0000
396@@ -44,7 +44,6 @@
397 SurfaceAllocator(std::shared_ptr<BufferStreamFactory> const& bb_factory,
398 std::shared_ptr<input::InputChannelFactory> const& input_factory,
399 std::shared_ptr<input::InputSender> const& input_sender,
400- std::shared_ptr<SurfaceConfigurator> const& configurator,
401 std::shared_ptr<graphics::CursorImage> const& default_cursor_image,
402 std::shared_ptr<SceneReport> const& report);
403
404@@ -54,7 +53,6 @@
405 std::shared_ptr<BufferStreamFactory> const buffer_stream_factory;
406 std::shared_ptr<input::InputChannelFactory> const input_factory;
407 std::shared_ptr<input::InputSender> const input_sender;
408- std::shared_ptr<SurfaceConfigurator> const configurator;
409 std::shared_ptr<graphics::CursorImage> const default_cursor_image;
410 std::shared_ptr<SceneReport> const report;
411 };
412
413=== modified file 'src/server/server.cpp'
414--- src/server/server.cpp 2015-01-29 04:34:12 +0000
415+++ src/server/server.cpp 2015-01-30 14:41:53 +0000
416@@ -60,6 +60,7 @@
417 MACRO(session_authorizer)\
418 MACRO(session_listener)\
419 MACRO(session_mediator_report)\
420+ MACRO(shell)\
421 MACRO(surface_configurator)
422
423 #define FOREACH_ACCESSOR(MACRO)\
424@@ -70,6 +71,7 @@
425 MACRO(the_focus_controller)\
426 MACRO(the_gl_config)\
427 MACRO(the_graphics_platform)\
428+ MACRO(the_input_targeter)\
429 MACRO(the_logger)\
430 MACRO(the_main_loop)\
431 MACRO(the_prompt_session_listener)\
432
433=== modified file 'src/server/shell/CMakeLists.txt'
434--- src/server/shell/CMakeLists.txt 2015-01-29 04:34:12 +0000
435+++ src/server/shell/CMakeLists.txt 2015-01-30 14:41:53 +0000
436@@ -1,6 +1,7 @@
437 set(
438 SHELL_SOURCES
439
440+ abstract_shell.cpp
441 default_placement_strategy.cpp
442 frontend_shell.cpp
443 graphics_display_layout.cpp
444
445=== added file 'src/server/shell/abstract_shell.cpp'
446--- src/server/shell/abstract_shell.cpp 1970-01-01 00:00:00 +0000
447+++ src/server/shell/abstract_shell.cpp 2015-01-30 14:41:53 +0000
448@@ -0,0 +1,197 @@
449+/*
450+ * Copyright © 2015 Canonical Ltd.
451+ *
452+ * This program is free software: you can redistribute it and/or modify it
453+ * under the terms of the GNU General Public License version 3,
454+ * as published by the Free Software Foundation.
455+ *
456+ * This program is distributed in the hope that it will be useful,
457+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
458+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
459+ * GNU General Public License for more details.
460+ *
461+ * You should have received a copy of the GNU General Public License
462+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
463+ *
464+ * Authored By: Alan Griffiths <alan@octopull.co.uk>
465+ */
466+
467+#include "mir/shell/abstract_shell.h"
468+#include "mir/shell/input_targeter.h"
469+#include "mir/scene/prompt_session.h"
470+#include "mir/scene/prompt_session_manager.h"
471+#include "mir/scene/session_coordinator.h"
472+#include "mir/scene/session.h"
473+#include "mir/scene/surface.h"
474+#include "mir/scene/surface_coordinator.h"
475+
476+namespace mf = mir::frontend;
477+namespace ms = mir::scene;
478+namespace msh = mir::shell;
479+
480+msh::AbstractShell::AbstractShell(
481+ std::shared_ptr<InputTargeter> const& input_targeter,
482+ std::shared_ptr<scene::SurfaceCoordinator> const& surface_coordinator,
483+ std::shared_ptr<scene::SessionCoordinator> const& session_coordinator,
484+ std::shared_ptr<scene::PromptSessionManager> const& prompt_session_manager) :
485+ input_targeter(input_targeter),
486+ surface_coordinator(surface_coordinator),
487+ session_coordinator(session_coordinator),
488+ prompt_session_manager(prompt_session_manager)
489+{
490+}
491+
492+msh::AbstractShell::~AbstractShell() noexcept
493+{
494+}
495+
496+std::shared_ptr<ms::Session> msh::AbstractShell::open_session(
497+ pid_t client_pid,
498+ std::string const& name,
499+ std::shared_ptr<mf::EventSink> const& sink)
500+{
501+ return session_coordinator->open_session(client_pid, name, sink);
502+}
503+
504+void msh::AbstractShell::close_session(
505+ std::shared_ptr<ms::Session> const& session)
506+{
507+ prompt_session_manager->remove_session(session);
508+ session_coordinator->close_session(session);
509+}
510+
511+mf::SurfaceId msh::AbstractShell::create_surface(
512+ std::shared_ptr<ms::Session> const& session,
513+ ms::SurfaceCreationParameters const& params)
514+{
515+ return session->create_surface(params);
516+}
517+
518+void msh::AbstractShell::destroy_surface(
519+ std::shared_ptr<ms::Session> const& session,
520+ mf::SurfaceId surface)
521+{
522+ session->destroy_surface(surface);
523+}
524+
525+void msh::AbstractShell::handle_surface_created(
526+ std::shared_ptr<ms::Session> const& /*session*/)
527+{
528+}
529+
530+std::shared_ptr<ms::PromptSession> msh::AbstractShell::start_prompt_session_for(
531+ std::shared_ptr<ms::Session> const& session,
532+ scene::PromptSessionCreationParameters const& params)
533+{
534+ return prompt_session_manager->start_prompt_session_for(session, params);
535+}
536+
537+void msh::AbstractShell::add_prompt_provider_for(
538+ std::shared_ptr<ms::PromptSession> const& prompt_session,
539+ std::shared_ptr<ms::Session> const& session)
540+{
541+ prompt_session_manager->add_prompt_provider(prompt_session, session);
542+}
543+
544+void msh::AbstractShell::stop_prompt_session(
545+ std::shared_ptr<ms::PromptSession> const& prompt_session)
546+{
547+ prompt_session_manager->stop_prompt_session(prompt_session);
548+}
549+
550+int msh::AbstractShell::set_surface_attribute(
551+ std::shared_ptr<ms::Session> const& /*session*/,
552+ std::shared_ptr<ms::Surface> const& surface,
553+ MirSurfaceAttrib attrib,
554+ int value)
555+{
556+ return surface->configure(attrib, value);
557+}
558+
559+int msh::AbstractShell::get_surface_attribute(
560+ std::shared_ptr<ms::Surface> const& surface,
561+ MirSurfaceAttrib attrib)
562+{
563+ return surface->query(attrib);
564+}
565+
566+
567+void msh::AbstractShell::focus_next()
568+{
569+ std::unique_lock<std::mutex> lock(focus_mutex);
570+ auto focus = focus_session.lock();
571+
572+ focus = session_coordinator->successor_of(focus);
573+
574+ set_focus_to_locked(lock, focus);
575+}
576+
577+std::weak_ptr<ms::Session> msh::AbstractShell::focussed_application() const
578+{
579+ std::unique_lock<std::mutex> lg(focus_mutex);
580+ return focus_session;
581+}
582+
583+void msh::AbstractShell::set_focus_to(
584+ std::shared_ptr<scene::Session> const& focus)
585+{
586+ std::unique_lock<std::mutex> lg(focus_mutex);
587+ set_focus_to_locked(lg, focus);
588+}
589+
590+void msh::AbstractShell::set_focus_to_locked(
591+ std::unique_lock<std::mutex> const& /*lock*/,
592+ std::shared_ptr<ms::Surface> const& surface)
593+{
594+ setting_focus_to(surface);
595+
596+ if (surface)
597+ {
598+ // Ensure the surface has really taken the focus before notifying it that it is focused
599+ surface->take_input_focus(input_targeter);
600+ if (auto current_focus = focus_surface.lock())
601+ current_focus->configure(mir_surface_attrib_focus, mir_surface_unfocused);
602+
603+ surface->configure(mir_surface_attrib_focus, mir_surface_focused);
604+ focus_surface = surface;
605+ }
606+ else
607+ {
608+ input_targeter->focus_cleared();
609+ }
610+}
611+
612+void msh::AbstractShell::set_focus_to_locked(
613+ std::unique_lock<std::mutex> const& lock,
614+ std::shared_ptr<ms::Session> const& session)
615+{
616+ setting_focus_to(session);
617+
618+ auto old_focus = focus_session.lock();
619+
620+ std::shared_ptr<ms::Surface> surface;
621+
622+ if (session)
623+ surface = session->default_surface();
624+
625+ set_focus_to_locked(lock, surface);
626+
627+ focus_session = session;
628+
629+ if (session)
630+ {
631+ session_coordinator->set_focus_to(session);
632+ }
633+ else
634+ {
635+ session_coordinator->unset_focus();
636+ }
637+}
638+
639+void msh::AbstractShell::setting_focus_to(std::shared_ptr<ms::Surface> const& /*surface*/)
640+{
641+}
642+
643+void msh::AbstractShell::setting_focus_to(std::shared_ptr<ms::Session> const& /*session*/)
644+{
645+}
646
647=== modified file 'src/server/shell/default_configuration.cpp'
648--- src/server/shell/default_configuration.cpp 2015-01-29 04:34:12 +0000
649+++ src/server/shell/default_configuration.cpp 2015-01-30 14:41:53 +0000
650@@ -39,7 +39,8 @@
651 the_surface_coordinator(),
652 the_session_coordinator(),
653 the_prompt_session_manager(),
654- the_placement_strategy()));
655+ the_placement_strategy(),
656+ the_surface_configurator()));
657 });
658 }
659
660
661=== modified file 'src/server/shell/default_shell.cpp'
662--- src/server/shell/default_shell.cpp 2015-01-29 04:34:12 +0000
663+++ src/server/shell/default_shell.cpp 2015-01-30 14:41:53 +0000
664@@ -24,41 +24,24 @@
665 #include "mir/scene/session_coordinator.h"
666 #include "mir/scene/session.h"
667 #include "mir/scene/surface.h"
668+#include "mir/scene/surface_configurator.h"
669 #include "mir/scene/surface_coordinator.h"
670 #include "mir/scene/surface_creation_parameters.h"
671
672-#include <boost/throw_exception.hpp>
673-
674-#include <stdexcept>
675-
676 namespace mf = mir::frontend;
677 namespace ms = mir::scene;
678 namespace msh = mir::shell;
679
680-msh::AbstractShell::AbstractShell(
681- std::shared_ptr<InputTargeter> const& input_targeter,
682- std::shared_ptr<scene::SurfaceCoordinator> const& surface_coordinator,
683- std::shared_ptr<scene::SessionCoordinator> const& session_coordinator,
684- std::shared_ptr<scene::PromptSessionManager> const& prompt_session_manager) :
685- input_targeter(input_targeter),
686- surface_coordinator(surface_coordinator),
687- session_coordinator(session_coordinator),
688- prompt_session_manager(prompt_session_manager)
689-{
690-}
691-
692-msh::AbstractShell::~AbstractShell() noexcept
693-{
694-}
695-
696 msh::DefaultShell::DefaultShell(
697 std::shared_ptr<InputTargeter> const& input_targeter,
698 std::shared_ptr<scene::SurfaceCoordinator> const& surface_coordinator,
699 std::shared_ptr<scene::SessionCoordinator> const& session_coordinator,
700 std::shared_ptr<scene::PromptSessionManager> const& prompt_session_manager,
701- std::shared_ptr<ms::PlacementStrategy> const& placement_strategy) :
702+ std::shared_ptr<ms::PlacementStrategy> const& placement_strategy,
703+ std::shared_ptr<ms::SurfaceConfigurator> const& surface_configurator) :
704 AbstractShell(input_targeter, surface_coordinator, session_coordinator, prompt_session_manager),
705- placement_strategy(placement_strategy)
706+ placement_strategy{placement_strategy},
707+ surface_configurator{surface_configurator}
708 {
709 }
710
711@@ -67,7 +50,7 @@
712 std::string const& name,
713 std::shared_ptr<mf::EventSink> const& sink)
714 {
715- auto const new_session = session_coordinator->open_session(client_pid, name, sink);
716+ auto const new_session = AbstractShell::open_session(client_pid, name, sink);
717 set_focus_to(new_session);
718 return new_session;
719 }
720@@ -75,135 +58,39 @@
721 void msh::DefaultShell::close_session(
722 std::shared_ptr<ms::Session> const& session)
723 {
724- prompt_session_manager->remove_session(session);
725- session_coordinator->close_session(session);
726+ AbstractShell::close_session(session);
727 set_focus_to(session_coordinator->successor_of(std::shared_ptr<ms::Session>()));
728 }
729
730-void msh::DefaultShell::focus_next()
731-{
732- std::unique_lock<std::mutex> lock(focus_application_mutex);
733- auto focus = focus_application.lock();
734-
735- focus = session_coordinator->successor_of(focus);
736-
737- set_focus_to_locked(lock, focus);
738-}
739-
740-std::weak_ptr<ms::Session> msh::DefaultShell::focussed_application() const
741-{
742- std::unique_lock<std::mutex> lg(focus_application_mutex);
743- return focus_application;
744-}
745-
746-void msh::DefaultShell::set_focus_to(
747- std::shared_ptr<scene::Session> const& focus)
748-{
749- std::unique_lock<std::mutex> lg(focus_application_mutex);
750- set_focus_to_locked(lg, focus);
751-}
752-
753 void msh::DefaultShell::handle_surface_created(
754 std::shared_ptr<ms::Session> const& session)
755 {
756+ AbstractShell::handle_surface_created(session);
757 set_focus_to(session);
758 }
759
760-std::shared_ptr<ms::PromptSession> msh::DefaultShell::start_prompt_session_for(
761- std::shared_ptr<ms::Session> const& session,
762- scene::PromptSessionCreationParameters const& params)
763-{
764- return prompt_session_manager->start_prompt_session_for(session, params);
765-}
766-
767-void msh::DefaultShell::add_prompt_provider_for(
768- std::shared_ptr<ms::PromptSession> const& prompt_session,
769- std::shared_ptr<ms::Session> const& session)
770-{
771- prompt_session_manager->add_prompt_provider(prompt_session, session);
772-}
773-
774-void msh::DefaultShell::stop_prompt_session(std::shared_ptr<ms::PromptSession> const& prompt_session)
775-{
776- prompt_session_manager->stop_prompt_session(prompt_session);
777-}
778-
779 mf::SurfaceId msh::DefaultShell::create_surface(std::shared_ptr<ms::Session> const& session, ms::SurfaceCreationParameters const& params)
780 {
781- auto placed_params = placement_strategy->place(*session, params);
782- auto const result = session->create_surface(placed_params);
783- return result;
784-}
785-
786-void msh::DefaultShell::destroy_surface(std::shared_ptr<ms::Session> const& session, mf::SurfaceId surface)
787-{
788- session->destroy_surface(surface);
789+ return AbstractShell::create_surface(session, placement_strategy->place(*session, params));
790 }
791
792 int msh::DefaultShell::set_surface_attribute(
793 std::shared_ptr<ms::Session> const& session,
794- mf::SurfaceId surface_id,
795+ std::shared_ptr<ms::Surface> const& surface,
796 MirSurfaceAttrib attrib,
797 int value)
798 {
799- auto const surface = session->surface(surface_id);
800-
801- // TODO scene::SurfaceConfigurator is really a DefaultShell strategy
802- // TODO it should be invoked from here around any changes to the surface
803-
804- return surface->configure(attrib, value);
805-}
806-
807-int msh::DefaultShell::get_surface_attribute(
808- std::shared_ptr<ms::Session> const& session,
809- mf::SurfaceId surface_id,
810- MirSurfaceAttrib attrib)
811-{
812- auto const surface = session->surface(surface_id);
813-
814- if (!surface)
815- BOOST_THROW_EXCEPTION(std::logic_error("invalid surface id"));
816-
817- return surface->query(attrib);
818-}
819-
820-
821-inline void msh::DefaultShell::set_focus_to_locked(std::unique_lock<std::mutex> const&, std::shared_ptr<ms::Session> const& session)
822-{
823- auto old_focus = focus_application.lock();
824-
825- std::shared_ptr<ms::Surface> surface;
826-
827- if (session)
828- surface = session->default_surface();
829-
830+ auto const configured_value = surface_configurator->select_attribute_value(*surface, attrib, value);
831+
832+ auto const result = AbstractShell::set_surface_attribute(session, surface, attrib, configured_value);
833+
834+ surface_configurator->attribute_set(*surface, attrib, result);
835+
836+ return result;
837+}
838+
839+void msh::DefaultShell::setting_focus_to(std::shared_ptr<ms::Surface> const& surface)
840+{
841 if (surface)
842- {
843- std::lock_guard<std::mutex> lg(focus_surface_mutex);
844-
845- // Ensure the surface has really taken the focus before notifying it that it is focused
846 surface_coordinator->raise(surface);
847- surface->take_input_focus(input_targeter);
848-
849- auto current_focus = focus_surface.lock();
850- if (current_focus)
851- current_focus->configure(mir_surface_attrib_focus, mir_surface_unfocused);
852- surface->configure(mir_surface_attrib_focus, mir_surface_focused);
853- focus_surface = surface;
854- }
855- else
856- {
857- input_targeter->focus_cleared();
858- }
859-
860- focus_application = session;
861-
862- if (session)
863- {
864- session_coordinator->set_focus_to(session);
865- }
866- else
867- {
868- session_coordinator->unset_focus();
869- }
870 }
871
872=== modified file 'src/server/shell/default_shell.h'
873--- src/server/shell/default_shell.h 2015-01-30 10:22:51 +0000
874+++ src/server/shell/default_shell.h 2015-01-30 14:41:53 +0000
875@@ -19,13 +19,11 @@
876 #ifndef MIR_SHELL_DEFAULT_SHELL_H_
877 #define MIR_SHELL_DEFAULT_SHELL_H_
878
879-#include "mir/shell/shell.h"
880-
881-#include <mutex>
882+#include "mir/shell/abstract_shell.h"
883
884 namespace mir
885 {
886-namespace scene { class PlacementStrategy; }
887+namespace scene { class PlacementStrategy; class SurfaceConfigurator; }
888
889 namespace shell
890 {
891@@ -40,20 +38,8 @@
892 std::shared_ptr<scene::SurfaceCoordinator> const& surface_coordinator,
893 std::shared_ptr<scene::SessionCoordinator> const& session_coordinator,
894 std::shared_ptr<scene::PromptSessionManager> const& prompt_session_manager,
895- std::shared_ptr<scene::PlacementStrategy> const& placement_strategy);
896-
897-/** @name these come from FocusController
898- * I think the FocusController interface is unnecessary as:
899- * 1. the functions are only meaningful in the context of implementing a Shell
900- * 2. the implementation of these functions is Shell behaviour
901- * Simply providing them as part of a public ShellLibrary is probably adequate.
902- * @{ */
903- void focus_next() override;
904-
905- std::weak_ptr<scene::Session> focussed_application() const override;
906-
907- void set_focus_to(std::shared_ptr<scene::Session> const& focus) override;
908-/** @} */
909+ std::shared_ptr<scene::PlacementStrategy> const& placement_strategy,
910+ std::shared_ptr<scene::SurfaceConfigurator> const& surface_configurator);
911
912 /** @name these come from frontend::Shell
913 * @{ */
914@@ -66,42 +52,20 @@
915
916 void handle_surface_created(std::shared_ptr<scene::Session> const& session) override;
917
918- std::shared_ptr<scene::PromptSession> start_prompt_session_for(
919- std::shared_ptr<scene::Session> const& session,
920- scene::PromptSessionCreationParameters const& params) override;
921-
922- void add_prompt_provider_for(
923- std::shared_ptr<scene::PromptSession> const& prompt_session,
924- std::shared_ptr<scene::Session> const& session) override;
925-
926- void stop_prompt_session(std::shared_ptr<scene::PromptSession> const& prompt_session) override;
927-
928 frontend::SurfaceId create_surface(std::shared_ptr<scene::Session> const& session, scene::SurfaceCreationParameters const& params) override;
929
930- void destroy_surface(std::shared_ptr<scene::Session> const& session, frontend::SurfaceId surface) override;
931-
932 int set_surface_attribute(
933 std::shared_ptr<scene::Session> const& session,
934- frontend::SurfaceId surface_id,
935+ std::shared_ptr<scene::Surface> const& surface,
936 MirSurfaceAttrib attrib,
937 int value) override;
938-
939- int get_surface_attribute(
940- std::shared_ptr<scene::Session> const& session,
941- frontend::SurfaceId surface_id,
942- MirSurfaceAttrib attrib) override;
943 /** @} */
944
945 private:
946- std::shared_ptr<scene::PlacementStrategy> const placement_strategy; // TODO doesn't need to be a strategy
947-
948- std::mutex mutable focus_surface_mutex;
949- std::weak_ptr<scene::Surface> focus_surface;
950-
951- std::mutex mutable focus_application_mutex;
952- std::weak_ptr<scene::Session> focus_application;
953-
954- void set_focus_to_locked(std::unique_lock<std::mutex> const& lock, std::shared_ptr<scene::Session> const& next_focus);
955+ std::shared_ptr<scene::PlacementStrategy> const placement_strategy;
956+ std::shared_ptr<scene::SurfaceConfigurator> const surface_configurator;
957+
958+ void setting_focus_to(std::shared_ptr<scene::Surface> const& surface) override;
959 };
960 }
961 }
962
963=== modified file 'src/server/shell/frontend_shell.cpp'
964--- src/server/shell/frontend_shell.cpp 2015-01-26 12:19:09 +0000
965+++ src/server/shell/frontend_shell.cpp 2015-01-30 14:41:53 +0000
966@@ -91,7 +91,8 @@
967 int value)
968 {
969 auto const scene_session = std::dynamic_pointer_cast<ms::Session>(session);
970- return wrapped->set_surface_attribute(scene_session, surface_id, attrib, value);
971+ auto const surface = scene_session->surface(surface_id);
972+ return wrapped->set_surface_attribute(scene_session, surface, attrib, value);
973 }
974
975 int msh::FrontendShell::get_surface_attribute(
976@@ -100,5 +101,6 @@
977 MirSurfaceAttrib attrib)
978 {
979 auto const scene_session = std::dynamic_pointer_cast<ms::Session>(session);
980- return wrapped->get_surface_attribute(scene_session, surface_id, attrib);
981+ auto const surface = scene_session->surface(surface_id);
982+ return wrapped->get_surface_attribute(surface, attrib);
983 }
984
985=== modified file 'src/server/shell/shell_wrapper.cpp'
986--- src/server/shell/shell_wrapper.cpp 2015-01-26 17:58:48 +0000
987+++ src/server/shell/shell_wrapper.cpp 2015-01-30 14:41:53 +0000
988@@ -91,17 +91,16 @@
989
990 int msh::ShellWrapper::set_surface_attribute(
991 std::shared_ptr<ms::Session> const& session,
992- mf::SurfaceId surface_id,
993+ std::shared_ptr<ms::Surface> const& surface,
994 MirSurfaceAttrib attrib,
995 int value)
996 {
997- return wrapped->set_surface_attribute(session, surface_id, attrib, value);
998+ return wrapped->set_surface_attribute(session, surface, attrib, value);
999 }
1000
1001 int msh::ShellWrapper::get_surface_attribute(
1002- std::shared_ptr<ms::Session> const& session,
1003- mf::SurfaceId surface_id,
1004+ std::shared_ptr<ms::Surface> const& surface,
1005 MirSurfaceAttrib attrib)
1006 {
1007- return wrapped->get_surface_attribute(session, surface_id, attrib);
1008+ return wrapped->get_surface_attribute(surface, attrib);
1009 }
1010
1011=== modified file 'src/server/symbols.map'
1012--- src/server/symbols.map 2015-01-29 04:34:12 +0000
1013+++ src/server/symbols.map 2015-01-30 14:41:53 +0000
1014@@ -21,135 +21,14 @@
1015 mir::compositor::DisplayBufferCompositorFactory::operator*;
1016 mir::compositor::DisplayBufferCompositor::operator*;
1017 mir::compositor::Scene::add_observer*;
1018- mir::compositor::SceneElement::is_a_surface*;
1019- mir::compositor::SceneElement::occluded*;
1020- mir::compositor::SceneElement::operator*;
1021- mir::compositor::SceneElement::renderable*;
1022- mir::compositor::SceneElement::rendered*;
1023- mir::compositor::SceneElement::?SceneElement*;
1024- mir::compositor::SceneElement::SceneElement*;
1025 mir::compositor::Scene::register_compositor*;
1026 mir::compositor::Scene::remove_observer*;
1027 mir::compositor::Scene::Scene*;
1028 mir::compositor::Scene::scene_elements_for*;
1029 mir::compositor::Scene::unregister_compositor*;
1030- mir::DefaultServerConfiguration::clock*;
1031- mir::DefaultServerConfiguration::DefaultServerConfiguration*;
1032- mir::DefaultServerConfiguration::is_key_repeat_enabled*;
1033- mir::DefaultServerConfiguration::new_ipc_factory*;
1034- mir::DefaultServerConfiguration::the_android_input_dispatcher*;
1035- mir::DefaultServerConfiguration::the_buffer_allocator*;
1036- mir::DefaultServerConfiguration::the_buffer_stream_factory*;
1037- mir::DefaultServerConfiguration::the_clock*;
1038- mir::DefaultServerConfiguration::the_composite_event_filter*;
1039- mir::DefaultServerConfiguration::the_compositor*;
1040- mir::DefaultServerConfiguration::the_compositor_report*;
1041- mir::DefaultServerConfiguration::the_connection_creator*;
1042- mir::DefaultServerConfiguration::the_connector*;
1043- mir::DefaultServerConfiguration::the_connector_report*;
1044- mir::DefaultServerConfiguration::the_coordinate_translator*;
1045- mir::DefaultServerConfiguration::the_cursor*;
1046- mir::DefaultServerConfiguration::the_cursor_images*;
1047- mir::DefaultServerConfiguration::the_cursor_listener*;
1048- mir::DefaultServerConfiguration::the_default_cursor_image*;
1049- mir::DefaultServerConfiguration::the_dispatcher_policy*;
1050- mir::DefaultServerConfiguration::the_dispatcher_thread*;
1051- mir::DefaultServerConfiguration::the_display*;
1052- mir::DefaultServerConfiguration::the_display_buffer_compositor_factory*;
1053- mir::DefaultServerConfiguration::the_display_changer*;
1054- mir::DefaultServerConfiguration::the_display_configuration_policy*;
1055- mir::DefaultServerConfiguration::the_display_report*;
1056- mir::DefaultServerConfiguration::the_emergency_cleanup*;
1057- mir::DefaultServerConfiguration::the_event_hub*;
1058- mir::DefaultServerConfiguration::the_fatal_error_strategy*;
1059- mir::DefaultServerConfiguration::the_focus_controller*;
1060- mir::DefaultServerConfiguration::the_frame_dropping_policy_factory*;
1061- mir::DefaultServerConfiguration::the_frontend_display_changer*;
1062- mir::DefaultServerConfiguration::the_frontend_shell*;
1063- mir::DefaultServerConfiguration::the_gl_config*;
1064- mir::DefaultServerConfiguration::the_global_event_sink*;
1065- mir::DefaultServerConfiguration::the_gl_program_factory*;
1066- mir::DefaultServerConfiguration::the_graphics_platform*;
1067- mir::DefaultServerConfiguration::the_host_connection*;
1068- mir::DefaultServerConfiguration::the_host_lifecycle_event_listener*;
1069- mir::DefaultServerConfiguration::the_input_channel_factory*;
1070- mir::DefaultServerConfiguration::the_input_dispatcher*;
1071- mir::DefaultServerConfiguration::the_input_manager*;
1072- mir::DefaultServerConfiguration::the_input_reader*;
1073- mir::DefaultServerConfiguration::the_input_reader_policy*;
1074- mir::DefaultServerConfiguration::the_input_reader_thread*;
1075- mir::DefaultServerConfiguration::the_input_region*;
1076- mir::DefaultServerConfiguration::the_input_registrar*;
1077- mir::DefaultServerConfiguration::the_input_report*;
1078- mir::DefaultServerConfiguration::the_input_scene*;
1079- mir::DefaultServerConfiguration::the_input_sender*;
1080- mir::DefaultServerConfiguration::the_input_send_observer*;
1081- mir::DefaultServerConfiguration::the_input_target_enumerator*;
1082- mir::DefaultServerConfiguration::the_input_targeter*;
1083- mir::DefaultServerConfiguration::the_input_translator*;
1084- mir::DefaultServerConfiguration::the_logger*;
1085- mir::DefaultServerConfiguration::the_main_loop*;
1086- mir::DefaultServerConfiguration::the_mediating_display_changer*;
1087- mir::DefaultServerConfiguration::the_message_processor_report*;
1088- mir::DefaultServerConfiguration::the_options*;
1089- mir::DefaultServerConfiguration::the_pixel_buffer*;
1090- mir::DefaultServerConfiguration::the_placement_strategy*;
1091- mir::DefaultServerConfiguration::the_prompt_connection_creator*;
1092- mir::DefaultServerConfiguration::the_prompt_connector*;
1093- mir::DefaultServerConfiguration::the_prompt_session_listener*;
1094- mir::DefaultServerConfiguration::the_prompt_session_manager*;
1095- mir::DefaultServerConfiguration::the_renderer_factory*;
1096- mir::DefaultServerConfiguration::the_scene*;
1097- mir::DefaultServerConfiguration::the_scene_report*;
1098- mir::DefaultServerConfiguration::the_screencast*;
1099- mir::DefaultServerConfiguration::the_server_action_queue*;
1100- mir::DefaultServerConfiguration::the_server_status_listener*;
1101- mir::DefaultServerConfiguration::the_session_authorizer*;
1102- mir::DefaultServerConfiguration::the_session_container*;
1103- mir::DefaultServerConfiguration::the_session_coordinator*;
1104- mir::DefaultServerConfiguration::the_session_event_handler_register*;
1105- mir::DefaultServerConfiguration::the_session_event_sink*;
1106- mir::DefaultServerConfiguration::the_session_listener*;
1107- mir::DefaultServerConfiguration::the_session_mediator_report*;
1108- mir::DefaultServerConfiguration::the_shared_library_prober_report*;
1109- mir::DefaultServerConfiguration::the_shell*;
1110- mir::DefaultServerConfiguration::the_shell_display_layout*;
1111- mir::DefaultServerConfiguration::the_snapshot_strategy*;
1112- mir::DefaultServerConfiguration::the_socket_file*;
1113- mir::DefaultServerConfiguration::the_surface_configurator*;
1114- mir::DefaultServerConfiguration::the_surface_coordinator*;
1115- mir::DefaultServerConfiguration::the_surface_factory*;
1116- mir::DefaultServerConfiguration::the_surface_stack_model*;
1117- mir::DefaultServerConfiguration::the_touch_visualizer*;
1118- mir::DefaultServerConfiguration::wrap_cursor_listener*;
1119- mir::DefaultServerConfiguration::wrap_display_buffer_compositor_factory*;
1120- mir::DefaultServerConfiguration::wrap_display_configuration_policy*;
1121- mir::DefaultServerConfiguration::wrap_shell*;
1122- mir::DisplayServer::?DisplayServer*;
1123- mir::DisplayServer::DisplayServer*;
1124- mir::DisplayServer::run*;
1125- mir::DisplayServer::stop*;
1126- mir::EmergencyCleanup::operator*;
1127- mir::frontend::DisplayChanger::active_configuration*;
1128- mir::frontend::DisplayChanger::configure*;
1129- mir::frontend::DisplayChanger::?DisplayChanger*;
1130- mir::frontend::DisplayChanger::DisplayChanger*;
1131- mir::frontend::DisplayChanger::operator*;
1132- mir::frontend::EventSink::?EventSink*;
1133- mir::frontend::EventSink::EventSink*;
1134- mir::frontend::EventSink::handle_display_config_change*;
1135- mir::frontend::EventSink::handle_event*;
1136- mir::frontend::EventSink::handle_lifecycle_event*;
1137- mir::frontend::EventSink::operator*;
1138 mir::frontend::PromptSession::operator*;
1139 mir::frontend::PromptSession::?PromptSession*;
1140 mir::frontend::PromptSession::PromptSession*;
1141- mir::frontend::Screencast::capture*;
1142- mir::frontend::Screencast::create_session*;
1143- mir::frontend::Screencast::destroy_session*;
1144- mir::frontend::Screencast::operator*;
1145- mir::frontend::Screencast::?Screencast*;
1146- mir::frontend::Screencast::Screencast*;
1147 mir::frontend::SessionAuthorizer::configure_display_is_allowed*;
1148 mir::frontend::SessionAuthorizer::connection_is_allowed*;
1149 mir::frontend::SessionAuthorizer::operator*;
1150@@ -157,14 +36,11 @@
1151 mir::frontend::SessionAuthorizer::screencast_is_allowed*;
1152 mir::frontend::SessionAuthorizer::?SessionAuthorizer*;
1153 mir::frontend::SessionAuthorizer::SessionAuthorizer*;
1154- mir::frontend::Session::create_surface*;
1155 mir::frontend::SessionCredentials::gid*;
1156 mir::frontend::SessionCredentials::pid*;
1157 mir::frontend::SessionCredentials::SessionCredentials*;
1158 mir::frontend::SessionCredentials::uid*;
1159- mir::frontend::Session::destroy_surface*;
1160 mir::frontend::Session::get_surface*;
1161- mir::frontend::Session::hide*;
1162 mir::frontend::SessionMediatorReport::session_configure_display_called*;
1163 mir::frontend::SessionMediatorReport::session_configure_surface_called*;
1164 mir::frontend::SessionMediatorReport::session_configure_surface_cursor_called*;
1165@@ -182,22 +58,10 @@
1166 mir::frontend::Session::operator*;
1167 mir::frontend::Session::?Session*;
1168 mir::frontend::Session::Session*;
1169- mir::frontend::Session::show*;
1170- mir::frontend::Shell::add_prompt_provider_for*;
1171- mir::frontend::Shell::close_session*;
1172- mir::frontend::Shell::handle_surface_created*;
1173- mir::frontend::Shell::open_session*;
1174- mir::frontend::Shell::operator*;
1175- mir::frontend::Shell::?Shell*;
1176- mir::frontend::Shell::Shell*;
1177- mir::frontend::Shell::start_prompt_session_for*;
1178- mir::frontend::Shell::stop_prompt_session*;
1179 mir::frontend::Surface::client_input_fd*;
1180 mir::frontend::Surface::client_size*;
1181- mir::frontend::Surface::configure*;
1182 mir::frontend::Surface::operator*;
1183 mir::frontend::Surface::pixel_format*;
1184- mir::frontend::Surface::query*;
1185 mir::frontend::Surface::set_cursor_image*;
1186 mir::frontend::Surface::supports_input*;
1187 mir::frontend::Surface::?Surface*;
1188@@ -250,10 +114,12 @@
1189 mir::MainLoop::run*;
1190 mir::MainLoop::stop*;
1191 mir::report_exception*;
1192- mir::run_mir*;
1193 mir::scene::a_surface*;
1194 mir::scene::CoordinateTranslator::?CoordinateTranslator*;
1195 mir::scene::CoordinateTranslator::surface_to_screen*;
1196+ mir::scene::NullSessionListener::?NullSessionListener*;
1197+ mir::scene::NullSessionListener::NullSessionListener*;
1198+ mir::scene::NullSessionListener::operator*;
1199 mir::scene::NullSurfaceObserver::alpha_set_to*;
1200 mir::scene::NullSurfaceObserver::attrib_changed*;
1201 mir::scene::NullSurfaceObserver::client_surface_close_requested*;
1202@@ -287,8 +153,10 @@
1203 mir::scene::PromptSessionListener::prompt_provider_removed*;
1204 mir::scene::PromptSessionListener::?PromptSessionListener*;
1205 mir::scene::PromptSessionListener::PromptSessionListener*;
1206+ mir::scene::PromptSessionListener::resuming*;
1207 mir::scene::PromptSessionListener::starting*;
1208 mir::scene::PromptSessionListener::stopping*;
1209+ mir::scene::PromptSessionListener::suspending*;
1210 mir::scene::PromptSessionManager::add_prompt_provider*;
1211 mir::scene::PromptSessionManager::application_for*;
1212 mir::scene::PromptSessionManager::for_each_provider_in*;
1213@@ -297,10 +165,27 @@
1214 mir::scene::PromptSessionManager::?PromptSessionManager*;
1215 mir::scene::PromptSessionManager::PromptSessionManager*;
1216 mir::scene::PromptSessionManager::remove_session*;
1217+ mir::scene::PromptSessionManager::resume_prompt_session*;
1218 mir::scene::PromptSessionManager::start_prompt_session_for*;
1219 mir::scene::PromptSessionManager::stop_prompt_session*;
1220+ mir::scene::PromptSessionManager::suspend_prompt_session*;
1221+ mir::scene::PromptSession::resume*;
1222+ mir::scene::PromptSession::start*;
1223+ mir::scene::PromptSession::stop*;
1224+ mir::scene::PromptSession::suspend*;
1225+ mir::scene::SessionCoordinator::close_session*;
1226+ mir::scene::SessionCoordinator::open_session*;
1227+ mir::scene::SessionCoordinator::operator*;
1228+ mir::scene::SessionCoordinator::?SessionCoordinator*;
1229+ mir::scene::SessionCoordinator::SessionCoordinator*;
1230+ mir::scene::SessionCoordinator::set_focus_to*;
1231+ mir::scene::SessionCoordinator::successor_of*;
1232+ mir::scene::SessionCoordinator::unset_focus*;
1233+ mir::scene::Session::create_surface*;
1234 mir::scene::Session::default_surface*;
1235+ mir::scene::Session::destroy_surface*;
1236 mir::scene::Session::force_requests_to_complete*;
1237+ mir::scene::Session::hide*;
1238 mir::scene::SessionListener::destroying_surface*;
1239 mir::scene::SessionListener::focused*;
1240 mir::scene::SessionListener::operator*;
1241@@ -311,10 +196,14 @@
1242 mir::scene::SessionListener::surface_created*;
1243 mir::scene::SessionListener::unfocused*;
1244 mir::scene::Session::process_id*;
1245+ mir::scene::Session::resume_prompt_session*;
1246 mir::scene::Session::send_display_config*;
1247 mir::scene::Session::set_lifecycle_state*;
1248+ mir::scene::Session::show*;
1249 mir::scene::Session::start_prompt_session*;
1250 mir::scene::Session::stop_prompt_session*;
1251+ mir::scene::Session::surface*;
1252+ mir::scene::Session::suspend_prompt_session*;
1253 mir::scene::Session::take_snapshot*;
1254 mir::scene::Surface::add_observer*;
1255 mir::scene::Surface::allow_framedropping*;
1256@@ -330,6 +219,7 @@
1257 mir::scene::SurfaceConfigurator::select_attribute_value*;
1258 mir::scene::SurfaceConfigurator::?SurfaceConfigurator*;
1259 mir::scene::SurfaceConfigurator::SurfaceConfigurator*;
1260+ mir::scene::Surface::configure*;
1261 mir::scene::SurfaceCoordinator::add_surface*;
1262 mir::scene::SurfaceCoordinator::operator*;
1263 mir::scene::SurfaceCoordinator::raise*;
1264@@ -342,9 +232,15 @@
1265 mir::scene::SurfaceCreationParameters::of_pixel_format*;
1266 mir::scene::SurfaceCreationParameters::of_position*;
1267 mir::scene::SurfaceCreationParameters::of_size*;
1268+ mir::scene::SurfaceCreationParameters::of_type*;
1269 mir::scene::SurfaceCreationParameters::SurfaceCreationParameters*;
1270+ mir::scene::SurfaceCreationParameters::with_aux_rect*;
1271+ mir::scene::SurfaceCreationParameters::with_edge_attachment*;
1272 mir::scene::SurfaceCreationParameters::with_input_mode*;
1273 mir::scene::SurfaceCreationParameters::with_output_id*;
1274+ mir::scene::SurfaceCreationParameters::with_parent_id*;
1275+ mir::scene::SurfaceCreationParameters::with_preferred_orientation*;
1276+ mir::scene::SurfaceCreationParameters::with_state*;
1277 mir::scene::Surface::cursor_image*;
1278 mir::scene::Surface::force_requests_to_complete*;
1279 mir::scene::Surface::hide*;
1280@@ -366,6 +262,8 @@
1281 mir::scene::SurfaceObserver::?SurfaceObserver*;
1282 mir::scene::SurfaceObserver::SurfaceObserver*;
1283 mir::scene::SurfaceObserver::transformation_set_to*;
1284+ mir::scene::Surface::parent*;
1285+ mir::scene::Surface::query*;
1286 mir::scene::Surface::remove_observer*;
1287 mir::scene::Surface::request_client_surface_close*;
1288 mir::scene::Surface::resize*;
1289@@ -381,6 +279,7 @@
1290 mir::scene::Surface::take_input_focus*;
1291 mir::scene::Surface::top_left*;
1292 mir::scene::Surface::type*;
1293+ mir::scene::Surface::visible*;
1294 mir::ServerActionQueue::enqueue*;
1295 mir::ServerActionQueue::operator*;
1296 mir::ServerActionQueue::pause_processing_for*;
1297@@ -391,21 +290,6 @@
1298 mir::Server::add_emergency_cleanup*;
1299 mir::Server::add_init_callback*;
1300 mir::Server::apply_settings*;
1301- mir::ServerConfiguration::operator*;
1302- mir::ServerConfiguration::?ServerConfiguration*;
1303- mir::ServerConfiguration::ServerConfiguration*;
1304- mir::ServerConfiguration::the_compositor*;
1305- mir::ServerConfiguration::the_connector*;
1306- mir::ServerConfiguration::the_display*;
1307- mir::ServerConfiguration::the_display_changer*;
1308- mir::ServerConfiguration::the_emergency_cleanup*;
1309- mir::ServerConfiguration::the_fatal_error_strategy*;
1310- mir::ServerConfiguration::the_graphics_platform*;
1311- mir::ServerConfiguration::the_input_dispatcher*;
1312- mir::ServerConfiguration::the_input_manager*;
1313- mir::ServerConfiguration::the_main_loop*;
1314- mir::ServerConfiguration::the_prompt_connector*;
1315- mir::ServerConfiguration::the_server_status_listener*;
1316 mir::Server::exited_normally*;
1317 mir::Server::get_options*;
1318 mir::Server::open_client_socket*;
1319@@ -423,6 +307,7 @@
1320 mir::Server::override_the_session_authorizer*;
1321 mir::Server::override_the_session_listener*;
1322 mir::Server::override_the_session_mediator_report*;
1323+ mir::Server::override_the_shell*;
1324 mir::Server::override_the_surface_configurator*;
1325 mir::Server::run*;
1326 mir::Server::Server*;
1327@@ -446,6 +331,7 @@
1328 mir::Server::the_focus_controller*;
1329 mir::Server::the_gl_config*;
1330 mir::Server::the_graphics_platform*;
1331+ mir::Server::the_input_targeter*;
1332 mir::Server::the_logger*;
1333 mir::Server::the_main_loop*;
1334 mir::Server::the_prompt_session_listener*;
1335@@ -462,6 +348,22 @@
1336 mir::Server::wrap_display_buffer_compositor_factory*;
1337 mir::Server::wrap_display_configuration_policy*;
1338 mir::Server::wrap_shell*;
1339+ mir::shell::AbstractShell::?AbstractShell*;
1340+ mir::shell::AbstractShell::AbstractShell*;
1341+ mir::shell::AbstractShell::add_prompt_provider_for*;
1342+ mir::shell::AbstractShell::close_session*;
1343+ mir::shell::AbstractShell::create_surface*;
1344+ mir::shell::AbstractShell::destroy_surface*;
1345+ mir::shell::AbstractShell::focus_next*;
1346+ mir::shell::AbstractShell::focussed_application*;
1347+ mir::shell::AbstractShell::get_surface_attribute*;
1348+ mir::shell::AbstractShell::handle_surface_created*;
1349+ mir::shell::AbstractShell::open_session*;
1350+ mir::shell::AbstractShell::set_focus_to*;
1351+ mir::shell::AbstractShell::set_surface_attribute*;
1352+ mir::shell::AbstractShell::setting_focus_to*;
1353+ mir::shell::AbstractShell::start_prompt_session_for*;
1354+ mir::shell::AbstractShell::stop_prompt_session*;
1355 mir::shell::DisplayLayout::clip_to_output*;
1356 mir::shell::DisplayLayout::?DisplayLayout*;
1357 mir::shell::DisplayLayout::DisplayLayout*;
1358@@ -486,20 +388,44 @@
1359 mir::shell::InputTargeter::?InputTargeter*;
1360 mir::shell::InputTargeter::InputTargeter*;
1361 mir::shell::InputTargeter::operator*;
1362+ mir::shell::SessionCoordinatorWrapper::add_prompt_provider_for*;
1363+ mir::shell::SessionCoordinatorWrapper::close_session*;
1364+ mir::shell::SessionCoordinatorWrapper::focus_next*;
1365+ mir::shell::SessionCoordinatorWrapper::focussed_application*;
1366+ mir::shell::SessionCoordinatorWrapper::handle_surface_created*;
1367+ mir::shell::SessionCoordinatorWrapper::open_session*;
1368+ mir::shell::SessionCoordinatorWrapper::SessionCoordinatorWrapper*;
1369+ mir::shell::SessionCoordinatorWrapper::set_focus_to*;
1370+ mir::shell::SessionCoordinatorWrapper::start_prompt_session_for*;
1371+ mir::shell::SessionCoordinatorWrapper::stop_prompt_session*;
1372+ mir::shell::Shell::add_prompt_provider_for*;
1373+ mir::shell::Shell::close_session*;
1374+ mir::shell::Shell::create_surface*;
1375+ mir::shell::Shell::destroy_surface*;
1376+ mir::shell::Shell::get_surface_attribute*;
1377+ mir::shell::Shell::handle_surface_created*;
1378+ mir::shell::Shell::open_session*;
1379+ mir::shell::Shell::set_surface_attribute*;
1380+ mir::shell::Shell::start_prompt_session_for*;
1381+ mir::shell::Shell::stop_prompt_session*;
1382 mir::shell::ShellWrapper::add_prompt_provider_for*;
1383 mir::shell::ShellWrapper::close_session*;
1384 mir::shell::ShellWrapper::create_surface*;
1385 mir::shell::ShellWrapper::destroy_surface*;
1386+ mir::shell::ShellWrapper::focus_next*;
1387 mir::shell::ShellWrapper::focussed_application*;
1388- mir::shell::ShellWrapper::focus_next*;
1389 mir::shell::ShellWrapper::get_surface_attribute*;
1390 mir::shell::ShellWrapper::handle_surface_created*;
1391 mir::shell::ShellWrapper::open_session*;
1392+ mir::shell::ShellWrapper::set_focus_to*;
1393 mir::shell::ShellWrapper::set_surface_attribute*;
1394- mir::shell::ShellWrapper::set_focus_to*;
1395+ mir::shell::ShellWrapper::ShellWrapper*;
1396 mir::shell::ShellWrapper::start_prompt_session_for*;
1397 mir::shell::ShellWrapper::stop_prompt_session*;
1398- mir::shell::ShellWrapper::ShellWrapper*;
1399+ mir::shell::SurfaceCoordinatorWrapper::add_surface*;
1400+ mir::shell::SurfaceCoordinatorWrapper::raise*;
1401+ mir::shell::SurfaceCoordinatorWrapper::remove_surface*;
1402+ mir::shell::SurfaceCoordinatorWrapper::SurfaceCoordinatorWrapper*;
1403 mir::terminate_with_current_exception*;
1404 mir::time::Alarm::?Alarm*;
1405 mir::time::Alarm::Alarm*;
1406@@ -516,98 +442,9 @@
1407 mir::time::Timer::Timer*;
1408 non-virtual?thunk?to?mir::compositor::DisplayBufferCompositor::?DisplayBufferCompositor*;
1409 non-virtual?thunk?to?mir::compositor::DisplayBufferCompositorFactory::?DisplayBufferCompositorFactory*;
1410- non-virtual?thunk?to?mir::compositor::SceneElement::?SceneElement*;
1411- non-virtual?thunk?to?mir::DefaultServerConfiguration::is_key_repeat_enabled*;
1412- non-virtual?thunk?to?mir::DefaultServerConfiguration::new_ipc_factory*;
1413- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_android_input_dispatcher*;
1414- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_buffer_allocator*;
1415- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_buffer_stream_factory*;
1416- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_clock*;
1417- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_composite_event_filter*;
1418- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_compositor*;
1419- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_compositor_report*;
1420- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_connection_creator*;
1421- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_connector*;
1422- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_connector_report*;
1423- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_coordinate_translator*;
1424- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_cursor*;
1425- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_cursor_images*;
1426- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_cursor_listener*;
1427- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_default_cursor_image*;
1428- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_dispatcher_policy*;
1429- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_dispatcher_thread*;
1430- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_display*;
1431- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_display_buffer_compositor_factory*;
1432- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_display_changer*;
1433- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_display_configuration_policy*;
1434- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_display_report*;
1435- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_emergency_cleanup*;
1436- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_event_hub*;
1437- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_fatal_error_strategy*;
1438- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_frame_dropping_policy_factory*;
1439- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_frontend_display_changer*;
1440- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_gl_config*;
1441- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_global_event_sink*;
1442- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_gl_program_factory*;
1443- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_graphics_platform*;
1444- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_host_connection*;
1445- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_host_lifecycle_event_listener*;
1446- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_input_channel_factory*;
1447- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_input_dispatcher*;
1448- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_input_manager*;
1449- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_input_reader*;
1450- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_input_reader_policy*;
1451- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_input_reader_thread*;
1452- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_input_region*;
1453- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_input_registrar*;
1454- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_input_report*;
1455- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_input_scene*;
1456- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_input_sender*;
1457- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_input_send_observer*;
1458- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_input_target_enumerator*;
1459- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_input_targeter*;
1460- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_input_translator*;
1461- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_logger*;
1462- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_main_loop*;
1463- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_mediating_display_changer*;
1464- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_message_processor_report*;
1465- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_pixel_buffer*;
1466- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_placement_strategy*;
1467- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_prompt_connection_creator*;
1468- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_prompt_connector*;
1469- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_prompt_session_listener*;
1470- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_prompt_session_manager*;
1471- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_renderer_factory*;
1472- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_scene*;
1473- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_scene_report*;
1474- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_screencast*;
1475- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_server_action_queue*;
1476- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_server_status_listener*;
1477- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_session_authorizer*;
1478- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_session_container*;
1479- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_session_coordinator*;
1480- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_session_event_handler_register*;
1481- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_session_event_sink*;
1482- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_session_listener*;
1483- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_session_mediator_report*;
1484- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_shared_library_prober_report*;
1485- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_shell_display_layout*;
1486- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_snapshot_strategy*;
1487- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_socket_file*;
1488- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_surface_configurator*;
1489- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_surface_coordinator*;
1490- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_surface_factory*;
1491- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_surface_stack_model*;
1492- non-virtual?thunk?to?mir::DefaultServerConfiguration::the_touch_visualizer*;
1493- non-virtual?thunk?to?mir::DefaultServerConfiguration::wrap_cursor_listener*;
1494- non-virtual?thunk?to?mir::DefaultServerConfiguration::wrap_display_configuration_policy*;
1495- non-virtual?thunk?to?mir::frontend::DisplayChanger::?DisplayChanger*;
1496- non-virtual?thunk?to?mir::frontend::EventSink::?EventSink*;
1497 non-virtual?thunk?to?mir::frontend::PromptSession::?PromptSession*;
1498- non-virtual?thunk?to?mir::frontend::Screencast::?Screencast*;
1499 non-virtual?thunk?to?mir::frontend::SessionAuthorizer::?SessionAuthorizer*;
1500 non-virtual?thunk?to?mir::frontend::Session::?Session*;
1501- non-virtual?thunk?to?mir::frontend::Shell::?Shell*;
1502 non-virtual?thunk?to?mir::frontend::Surface::?Surface*;
1503 non-virtual?thunk?to?mir::input::CursorImages::?CursorImages*;
1504 non-virtual?thunk?to?mir::input::CursorListener::?CursorListener*;
1505@@ -616,6 +453,7 @@
1506 non-virtual?thunk?to?mir::input::Surface::?Surface*;
1507 non-virtual?thunk?to?mir::input::TouchVisualizer::?TouchVisualizer*;
1508 non-virtual?thunk?to?mir::scene::CoordinateTranslator::?CoordinateTranslator*;
1509+ non-virtual?thunk?to?mir::scene::NullSessionListener::?NullSessionListener*;
1510 non-virtual?thunk?to?mir::scene::NullSurfaceObserver::alpha_set_to*;
1511 non-virtual?thunk?to?mir::scene::NullSurfaceObserver::attrib_changed*;
1512 non-virtual?thunk?to?mir::scene::NullSurfaceObserver::client_surface_close_requested*;
1513@@ -632,37 +470,64 @@
1514 non-virtual?thunk?to?mir::scene::PlacementStrategy::?PlacementStrategy*;
1515 non-virtual?thunk?to?mir::scene::PromptSessionListener::?PromptSessionListener*;
1516 non-virtual?thunk?to?mir::scene::PromptSessionManager::?PromptSessionManager*;
1517+ non-virtual?thunk?to?mir::scene::SessionCoordinator::?SessionCoordinator*;
1518 non-virtual?thunk?to?mir::scene::SessionListener::?SessionListener*;
1519 non-virtual?thunk?to?mir::scene::SurfaceBufferAccess::?SurfaceBufferAccess*;
1520 non-virtual?thunk?to?mir::scene::SurfaceConfigurator::?SurfaceConfigurator*;
1521 non-virtual?thunk?to?mir::scene::SurfaceCoordinator::?SurfaceCoordinator*;
1522 non-virtual?thunk?to?mir::scene::SurfaceObserver::?SurfaceObserver*;
1523 non-virtual?thunk?to?mir::ServerActionQueue::?ServerActionQueue*;
1524- non-virtual?thunk?to?mir::ServerConfiguration::?ServerConfiguration*;
1525 non-virtual?thunk?to?mir::ServerStatusListener::?ServerStatusListener*;
1526+ non-virtual?thunk?to?mir::shell::AbstractShell::add_prompt_provider_for*;
1527+ non-virtual?thunk?to?mir::shell::AbstractShell::close_session*;
1528+ non-virtual?thunk?to?mir::shell::AbstractShell::create_surface*;
1529+ non-virtual?thunk?to?mir::shell::AbstractShell::destroy_surface*;
1530+ non-virtual?thunk?to?mir::shell::AbstractShell::focus_next*;
1531+ non-virtual?thunk?to?mir::shell::AbstractShell::focussed_application*;
1532+ non-virtual?thunk?to?mir::shell::AbstractShell::get_surface_attribute*;
1533+ non-virtual?thunk?to?mir::shell::AbstractShell::handle_surface_created*;
1534+ non-virtual?thunk?to?mir::shell::AbstractShell::open_session*;
1535+ non-virtual?thunk?to?mir::shell::AbstractShell::set_focus_to*;
1536+ non-virtual?thunk?to?mir::shell::AbstractShell::set_surface_attribute*;
1537+ non-virtual?thunk?to?mir::shell::AbstractShell::setting_focus_to*;
1538+ non-virtual?thunk?to?mir::shell::AbstractShell::start_prompt_session_for*;
1539+ non-virtual?thunk?to?mir::shell::AbstractShell::stop_prompt_session*;
1540 non-virtual?thunk?to?mir::shell::DisplayLayout::?DisplayLayout*;
1541 non-virtual?thunk?to?mir::shell::FocusController::?FocusController*;
1542 non-virtual?thunk?to?mir::shell::HostLifecycleEventListener::?HostLifecycleEventListener*;
1543 non-virtual?thunk?to?mir::shell::InputTargeter::?InputTargeter*;
1544+ non-virtual?thunk?to?mir::shell::SessionCoordinatorWrapper::close_session*;
1545+ non-virtual?thunk?to?mir::shell::SessionCoordinatorWrapper::focus_next*;
1546+ non-virtual?thunk?to?mir::shell::SessionCoordinatorWrapper::focussed_application*;
1547+ non-virtual?thunk?to?mir::shell::SessionCoordinatorWrapper::open_session*;
1548+ non-virtual?thunk?to?mir::shell::SessionCoordinatorWrapper::set_focus_to*;
1549+ non-virtual?thunk?to?mir::shell::ShellWrapper::add_prompt_provider_for*;
1550+ non-virtual?thunk?to?mir::shell::ShellWrapper::close_session*;
1551+ non-virtual?thunk?to?mir::shell::ShellWrapper::create_surface*;
1552+ non-virtual?thunk?to?mir::shell::ShellWrapper::destroy_surface*;
1553+ non-virtual?thunk?to?mir::shell::ShellWrapper::focus_next*;
1554+ non-virtual?thunk?to?mir::shell::ShellWrapper::focussed_application*;
1555+ non-virtual?thunk?to?mir::shell::ShellWrapper::get_surface_attribute*;
1556+ non-virtual?thunk?to?mir::shell::ShellWrapper::handle_surface_created*;
1557+ non-virtual?thunk?to?mir::shell::ShellWrapper::open_session*;
1558+ non-virtual?thunk?to?mir::shell::ShellWrapper::set_focus_to*;
1559+ non-virtual?thunk?to?mir::shell::ShellWrapper::set_surface_attribute*;
1560+ non-virtual?thunk?to?mir::shell::ShellWrapper::start_prompt_session_for*;
1561+ non-virtual?thunk?to?mir::shell::ShellWrapper::stop_prompt_session*;
1562+ non-virtual?thunk?to?mir::shell::SurfaceCoordinatorWrapper::add_surface*;
1563+ non-virtual?thunk?to?mir::shell::SurfaceCoordinatorWrapper::raise*;
1564+ non-virtual?thunk?to?mir::shell::SurfaceCoordinatorWrapper::remove_surface*;
1565 non-virtual?thunk?to?mir::time::Alarm::?Alarm*;
1566 non-virtual?thunk?to?mir::time::Timer::?Timer*;
1567 typeinfo?for?mir::compositor::Compositor;
1568 typeinfo?for?mir::compositor::DisplayBufferCompositor;
1569 typeinfo?for?mir::compositor::DisplayBufferCompositorFactory;
1570 typeinfo?for?mir::compositor::Scene;
1571- typeinfo?for?mir::compositor::SceneElement;
1572- typeinfo?for?mir::DefaultServerConfiguration;
1573- typeinfo?for?mir::DisplayServer;
1574- typeinfo?for?mir::EmergencyCleanup;
1575- typeinfo?for?mir::frontend::DisplayChanger;
1576- typeinfo?for?mir::frontend::EventSink;
1577 typeinfo?for?mir::frontend::PromptSession;
1578- typeinfo?for?mir::frontend::Screencast;
1579 typeinfo?for?mir::frontend::Session;
1580 typeinfo?for?mir::frontend::SessionAuthorizer;
1581 typeinfo?for?mir::frontend::SessionCredentials;
1582 typeinfo?for?mir::frontend::SessionMediatorReport;
1583- typeinfo?for?mir::frontend::Shell;
1584 typeinfo?for?mir::frontend::Surface;
1585 typeinfo?for?mir::input::CompositeEventFilter;
1586 typeinfo?for?mir::input::CursorImages;
1587@@ -676,6 +541,7 @@
1588 typeinfo?for?mir::input::TouchVisualizer::Spot;
1589 typeinfo?for?mir::MainLoop;
1590 typeinfo?for?mir::scene::CoordinateTranslator;
1591+ typeinfo?for?mir::scene::NullSessionListener;
1592 typeinfo?for?mir::scene::NullSurfaceObserver;
1593 typeinfo?for?mir::scene::Observer;
1594 typeinfo?for?mir::scene::PlacementStrategy;
1595@@ -695,33 +561,28 @@
1596 typeinfo?for?mir::scene::SurfaceObserver;
1597 typeinfo?for?mir::Server;
1598 typeinfo?for?mir::ServerActionQueue;
1599- typeinfo?for?mir::ServerConfiguration;
1600 typeinfo?for?mir::ServerStatusListener;
1601+ typeinfo?for?mir::shell::AbstractShell;
1602 typeinfo?for?mir::shell::DisplayLayout;
1603 typeinfo?for?mir::shell::FocusController;
1604 typeinfo?for?mir::shell::FocusSetter;
1605 typeinfo?for?mir::shell::HostLifecycleEventListener;
1606 typeinfo?for?mir::shell::InputTargeter;
1607+ typeinfo?for?mir::shell::SessionCoordinatorWrapper;
1608+ typeinfo?for?mir::shell::Shell;
1609 typeinfo?for?mir::shell::ShellWrapper;
1610+ typeinfo?for?mir::shell::SurfaceCoordinatorWrapper;
1611 typeinfo?for?mir::time::Alarm;
1612 typeinfo?for?mir::time::Timer;
1613 vtable?for?mir::compositor::Compositor;
1614 vtable?for?mir::compositor::DisplayBufferCompositor;
1615 vtable?for?mir::compositor::DisplayBufferCompositorFactory;
1616 vtable?for?mir::compositor::Scene;
1617- vtable?for?mir::compositor::SceneElement;
1618- vtable?for?mir::DefaultServerConfiguration;
1619- vtable?for?mir::DisplayServer;
1620- vtable?for?mir::EmergencyCleanup;
1621- vtable?for?mir::frontend::DisplayChanger;
1622- vtable?for?mir::frontend::EventSink;
1623 vtable?for?mir::frontend::PromptSession;
1624- vtable?for?mir::frontend::Screencast;
1625 vtable?for?mir::frontend::Session;
1626 vtable?for?mir::frontend::SessionAuthorizer;
1627 vtable?for?mir::frontend::SessionCredentials;
1628 vtable?for?mir::frontend::SessionMediatorReport;
1629- vtable?for?mir::frontend::Shell;
1630 vtable?for?mir::frontend::Surface;
1631 vtable?for?mir::input::CompositeEventFilter;
1632 vtable?for?mir::input::CursorImages;
1633@@ -735,6 +596,7 @@
1634 vtable?for?mir::input::TouchVisualizer::Spot;
1635 vtable?for?mir::MainLoop;
1636 vtable?for?mir::scene::CoordinateTranslator;
1637+ vtable?for?mir::scene::NullSessionListener;
1638 vtable?for?mir::scene::NullSurfaceObserver;
1639 vtable?for?mir::scene::Observer;
1640 vtable?for?mir::scene::PlacementStrategy;
1641@@ -754,16 +616,37 @@
1642 vtable?for?mir::scene::SurfaceObserver;
1643 vtable?for?mir::Server;
1644 vtable?for?mir::ServerActionQueue;
1645- vtable?for?mir::ServerConfiguration;
1646 vtable?for?mir::ServerStatusListener;
1647+ vtable?for?mir::shell::AbstractShell;
1648 vtable?for?mir::shell::DisplayLayout;
1649 vtable?for?mir::shell::FocusController;
1650 vtable?for?mir::shell::FocusSetter;
1651 vtable?for?mir::shell::HostLifecycleEventListener;
1652 vtable?for?mir::shell::InputTargeter;
1653+ vtable?for?mir::shell::SessionCoordinatorWrapper;
1654+ vtable?for?mir::shell::Shell;
1655+ vtable?for?mir::shell::ShellWrapper;
1656+ vtable?for?mir::shell::SurfaceCoordinatorWrapper;
1657 vtable?for?mir::time::Alarm;
1658 vtable?for?mir::time::Timer;
1659
1660+# needed but not picked up by current version of script
1661+ virtual?thunk?to?mir::shell::AbstractShell::?AbstractShell*;
1662+ virtual?thunk?to?mir::shell::AbstractShell::add_prompt_provider_for*;
1663+ virtual?thunk?to?mir::shell::AbstractShell::close_session*;
1664+ virtual?thunk?to?mir::shell::AbstractShell::create_surface*;
1665+ virtual?thunk?to?mir::shell::AbstractShell::destroy_surface*;
1666+ virtual?thunk?to?mir::shell::AbstractShell::focus_next*;
1667+ virtual?thunk?to?mir::shell::AbstractShell::focussed_application*;
1668+ virtual?thunk?to?mir::shell::AbstractShell::get_surface_attribute*;
1669+ virtual?thunk?to?mir::shell::AbstractShell::handle_surface_created*;
1670+ virtual?thunk?to?mir::shell::AbstractShell::open_session*;
1671+ virtual?thunk?to?mir::shell::AbstractShell::set_focus_to*;
1672+ virtual?thunk?to?mir::shell::AbstractShell::set_surface_attribute*;
1673+ virtual?thunk?to?mir::shell::AbstractShell::setting_focus_to*;
1674+ virtual?thunk?to?mir::shell::AbstractShell::start_prompt_session_for*;
1675+ virtual?thunk?to?mir::shell::AbstractShell::stop_prompt_session*;
1676+
1677 # these symbols are needed by mir_proving_server but are not intended to be public
1678 mir::compositor::GLProgramFamily::*;
1679 mir::compositor::GLRenderer::GLRenderer*;
1680@@ -781,6 +664,103 @@
1681 typeinfo?for?mir::compositor::GLRenderer;
1682 vtable?for?mir::compositor::GLRenderer;
1683 vtable?for?mir::compositor::RecentlyUsedCache;
1684+
1685+# these symbols are needed by the test framework but are not intended to be public
1686+ mir::DefaultServerConfiguration::clock*;
1687+ mir::DefaultServerConfiguration::DefaultServerConfiguration*;
1688+ mir::DefaultServerConfiguration::is_key_repeat_enabled*;
1689+ mir::DefaultServerConfiguration::new_ipc_factory*;
1690+ mir::DefaultServerConfiguration::the_android_input_dispatcher*;
1691+ mir::DefaultServerConfiguration::the_buffer_allocator*;
1692+ mir::DefaultServerConfiguration::the_buffer_stream_factory*;
1693+ mir::DefaultServerConfiguration::the_clock*;
1694+ mir::DefaultServerConfiguration::the_composite_event_filter*;
1695+ mir::DefaultServerConfiguration::the_compositor*;
1696+ mir::DefaultServerConfiguration::the_compositor_report*;
1697+ mir::DefaultServerConfiguration::the_connection_creator*;
1698+ mir::DefaultServerConfiguration::the_connector*;
1699+ mir::DefaultServerConfiguration::the_connector_report*;
1700+ mir::DefaultServerConfiguration::the_coordinate_translator*;
1701+ mir::DefaultServerConfiguration::the_cursor*;
1702+ mir::DefaultServerConfiguration::the_cursor_images*;
1703+ mir::DefaultServerConfiguration::the_cursor_listener*;
1704+ mir::DefaultServerConfiguration::the_default_cursor_image*;
1705+ mir::DefaultServerConfiguration::the_dispatcher_policy*;
1706+ mir::DefaultServerConfiguration::the_dispatcher_thread*;
1707+ mir::DefaultServerConfiguration::the_display*;
1708+ mir::DefaultServerConfiguration::the_display_buffer_compositor_factory*;
1709+ mir::DefaultServerConfiguration::the_display_changer*;
1710+ mir::DefaultServerConfiguration::the_display_configuration_policy*;
1711+ mir::DefaultServerConfiguration::the_display_report*;
1712+ mir::DefaultServerConfiguration::the_emergency_cleanup*;
1713+ mir::DefaultServerConfiguration::the_event_hub*;
1714+ mir::DefaultServerConfiguration::the_fatal_error_strategy*;
1715+ mir::DefaultServerConfiguration::the_focus_controller*;
1716+ mir::DefaultServerConfiguration::the_frame_dropping_policy_factory*;
1717+ mir::DefaultServerConfiguration::the_frontend_display_changer*;
1718+ mir::DefaultServerConfiguration::the_frontend_shell*;
1719+ mir::DefaultServerConfiguration::the_gl_config*;
1720+ mir::DefaultServerConfiguration::the_global_event_sink*;
1721+ mir::DefaultServerConfiguration::the_gl_program_factory*;
1722+ mir::DefaultServerConfiguration::the_graphics_platform*;
1723+ mir::DefaultServerConfiguration::the_host_connection*;
1724+ mir::DefaultServerConfiguration::the_host_lifecycle_event_listener*;
1725+ mir::DefaultServerConfiguration::the_input_channel_factory*;
1726+ mir::DefaultServerConfiguration::the_input_dispatcher*;
1727+ mir::DefaultServerConfiguration::the_input_manager*;
1728+ mir::DefaultServerConfiguration::the_input_reader*;
1729+ mir::DefaultServerConfiguration::the_input_reader_policy*;
1730+ mir::DefaultServerConfiguration::the_input_reader_thread*;
1731+ mir::DefaultServerConfiguration::the_input_region*;
1732+ mir::DefaultServerConfiguration::the_input_registrar*;
1733+ mir::DefaultServerConfiguration::the_input_report*;
1734+ mir::DefaultServerConfiguration::the_input_scene*;
1735+ mir::DefaultServerConfiguration::the_input_sender*;
1736+ mir::DefaultServerConfiguration::the_input_send_observer*;
1737+ mir::DefaultServerConfiguration::the_input_target_enumerator*;
1738+ mir::DefaultServerConfiguration::the_input_targeter*;
1739+ mir::DefaultServerConfiguration::the_input_translator*;
1740+ mir::DefaultServerConfiguration::the_logger*;
1741+ mir::DefaultServerConfiguration::the_main_loop*;
1742+ mir::DefaultServerConfiguration::the_mediating_display_changer*;
1743+ mir::DefaultServerConfiguration::the_message_processor_report*;
1744+ mir::DefaultServerConfiguration::the_options*;
1745+ mir::DefaultServerConfiguration::the_pixel_buffer*;
1746+ mir::DefaultServerConfiguration::the_placement_strategy*;
1747+ mir::DefaultServerConfiguration::the_prompt_connection_creator*;
1748+ mir::DefaultServerConfiguration::the_prompt_connector*;
1749+ mir::DefaultServerConfiguration::the_prompt_session_listener*;
1750+ mir::DefaultServerConfiguration::the_prompt_session_manager*;
1751+ mir::DefaultServerConfiguration::the_renderer_factory*;
1752+ mir::DefaultServerConfiguration::the_scene*;
1753+ mir::DefaultServerConfiguration::the_scene_report*;
1754+ mir::DefaultServerConfiguration::the_screencast*;
1755+ mir::DefaultServerConfiguration::the_server_action_queue*;
1756+ mir::DefaultServerConfiguration::the_server_status_listener*;
1757+ mir::DefaultServerConfiguration::the_session_authorizer*;
1758+ mir::DefaultServerConfiguration::the_session_container*;
1759+ mir::DefaultServerConfiguration::the_session_coordinator*;
1760+ mir::DefaultServerConfiguration::the_session_event_handler_register*;
1761+ mir::DefaultServerConfiguration::the_session_event_sink*;
1762+ mir::DefaultServerConfiguration::the_session_listener*;
1763+ mir::DefaultServerConfiguration::the_session_mediator_report*;
1764+ mir::DefaultServerConfiguration::the_shared_library_prober_report*;
1765+ mir::DefaultServerConfiguration::the_shell*;
1766+ mir::DefaultServerConfiguration::the_shell_display_layout*;
1767+ mir::DefaultServerConfiguration::the_snapshot_strategy*;
1768+ mir::DefaultServerConfiguration::the_socket_file*;
1769+ mir::DefaultServerConfiguration::the_surface_configurator*;
1770+ mir::DefaultServerConfiguration::the_surface_coordinator*;
1771+ mir::DefaultServerConfiguration::the_surface_factory*;
1772+ mir::DefaultServerConfiguration::the_surface_stack_model*;
1773+ mir::DefaultServerConfiguration::the_touch_visualizer*;
1774+ mir::DefaultServerConfiguration::wrap_cursor_listener*;
1775+ mir::DefaultServerConfiguration::wrap_display_buffer_compositor_factory*;
1776+ mir::DefaultServerConfiguration::wrap_display_configuration_policy*;
1777+ mir::DefaultServerConfiguration::wrap_shell*;
1778+ typeinfo?for?mir::DefaultServerConfiguration;
1779+ mir::run_mir*;
1780+ mir::DisplayServer::stop*;
1781 };
1782 local: *;
1783 };
1784
1785=== modified file 'tests/include/mir_test_doubles/mock_surface.h'
1786--- tests/include/mir_test_doubles/mock_surface.h 2015-01-14 06:39:13 +0000
1787+++ tests/include/mir_test_doubles/mock_surface.h 2015-01-30 14:41:53 +0000
1788@@ -43,7 +43,6 @@
1789 {},
1790 {},
1791 {},
1792- {},
1793 mir::report::null_scene_report())
1794 {
1795 }
1796
1797=== modified file 'tests/integration-tests/surface_composition.cpp'
1798--- tests/integration-tests/surface_composition.cpp 2015-01-14 06:39:13 +0000
1799+++ tests/integration-tests/surface_composition.cpp 2015-01-30 14:41:53 +0000
1800@@ -21,7 +21,6 @@
1801 #include "src/server/compositor/buffer_stream_surfaces.h"
1802 #include "src/server/compositor/buffer_queue.h"
1803
1804-#include "mir_test_doubles/null_surface_configurator.h"
1805 #include "mir_test_doubles/stub_buffer_allocator.h"
1806 #include "mir_test_doubles/stub_frame_dropping_policy_factory.h"
1807 #include "mir_test_doubles/stub_input_sender.h"
1808@@ -53,7 +52,6 @@
1809 create_buffer_stream(),
1810 create_input_channel(),
1811 create_input_sender(),
1812- create_surface_configurator(),
1813 create_cursor_image(),
1814 mr::null_scene_report());
1815
1816@@ -83,10 +81,6 @@
1817 auto create_cursor_image() const
1818 -> std::shared_ptr<mg::CursorImage> { return {}; }
1819
1820- auto create_surface_configurator() const
1821- -> std::shared_ptr<ms::SurfaceConfigurator>
1822- { return std::make_shared<mtd::NullSurfaceConfigurator>(); }
1823-
1824 auto create_input_sender() const
1825 -> std::shared_ptr<mi::InputSender>
1826 { return std::make_shared<mtd::StubInputSender>(); }
1827
1828=== modified file 'tests/integration-tests/test_default_shell.cpp'
1829--- tests/integration-tests/test_default_shell.cpp 2015-01-23 12:24:12 +0000
1830+++ tests/integration-tests/test_default_shell.cpp 2015-01-30 14:41:53 +0000
1831@@ -32,6 +32,7 @@
1832 #include "mir_test_doubles/null_snapshot_strategy.h"
1833 #include "mir_test_doubles/null_event_sink.h"
1834 #include "mir_test_doubles/null_session_event_sink.h"
1835+#include "mir_test_doubles/mock_surface_configurator.h"
1836 #include "mir_test_doubles/null_prompt_session_manager.h"
1837 #include "mir_test_doubles/mock_input_targeter.h"
1838
1839@@ -77,12 +78,15 @@
1840 mt::fake_shared(session_listener)
1841 };
1842
1843+ NiceMock<mtd::MockSurfaceConfigurator> surface_configurator;
1844+
1845 msh::DefaultShell shell{
1846 mt::fake_shared(input_targeter),
1847 mt::fake_shared(surface_coordinator),
1848 mt::fake_shared(session_manager),
1849 std::make_shared<mtd::NullPromptSessionManager>(),
1850- std::make_shared<NullPlacementStrategy>()};
1851+ std::make_shared<NullPlacementStrategy>(),
1852+ mt::fake_shared(surface_configurator)};
1853 };
1854 }
1855
1856@@ -197,10 +201,55 @@
1857
1858 ON_CALL(app, default_surface()).WillByDefault(Return(mock_surface));
1859
1860-
1861 InSequence seq;
1862 EXPECT_CALL(*mock_surface, take_input_focus(_));
1863 EXPECT_CALL(*mock_surface, configure(mir_surface_attrib_focus, mir_surface_focused)).Times(1);
1864
1865 shell.set_focus_to(mt::fake_shared(app));
1866 }
1867+
1868+TEST_F(TestDefaultShellAndFocusSelectionStrategy, configurator_selects_attribute_values)
1869+{
1870+ NiceMock<mtd::MockSceneSession> app;
1871+ auto const session = mt::fake_shared(app);
1872+ auto const surface = std::make_shared<NiceMock<mtd::MockSurface>>();
1873+ ON_CALL(*surface, configure(_, _)).WillByDefault(ReturnArg<1>());
1874+
1875+ InSequence seq;
1876+
1877+ EXPECT_CALL(surface_configurator, select_attribute_value(_, mir_surface_attrib_state, mir_surface_state_restored))
1878+ .WillOnce(Return(mir_surface_state_minimized));
1879+
1880+ EXPECT_CALL(*surface, configure(mir_surface_attrib_state, mir_surface_state_minimized));
1881+
1882+ EXPECT_CALL(surface_configurator, attribute_set(_, mir_surface_attrib_state, mir_surface_state_minimized));
1883+
1884+ EXPECT_THAT(
1885+ shell.set_surface_attribute(session, surface, mir_surface_attrib_state, mir_surface_state_restored),
1886+ Eq(mir_surface_state_minimized));
1887+}
1888+
1889+TEST_F(TestDefaultShellAndFocusSelectionStrategy, set_surface_attribute_returns_value_set_by_configurator)
1890+{
1891+ NiceMock<mtd::MockSceneSession> app;
1892+ auto const session = mt::fake_shared(app);
1893+ auto const surface = std::make_shared<NiceMock<mtd::MockSurface>>();
1894+ ON_CALL(*surface, configure(_, _)).WillByDefault(ReturnArg<1>());
1895+
1896+ ON_CALL(surface_configurator, select_attribute_value(_, Not(mir_surface_attrib_focus), _))
1897+ .WillByDefault(ReturnArg<1>());
1898+
1899+ ON_CALL(surface_configurator, select_attribute_value(_, mir_surface_attrib_focus, mir_surface_focused))
1900+ .WillByDefault(Return(mir_surface_unfocused));
1901+
1902+ ON_CALL(surface_configurator, select_attribute_value(_, mir_surface_attrib_focus, Not(mir_surface_focused)))
1903+ .WillByDefault(Return(mir_surface_focused));
1904+
1905+ EXPECT_THAT(
1906+ shell.set_surface_attribute(session, surface, mir_surface_attrib_focus, mir_surface_focused),
1907+ Eq(mir_surface_unfocused));
1908+
1909+ EXPECT_THAT(
1910+ shell.set_surface_attribute(session, surface, mir_surface_attrib_focus, mir_surface_unfocused),
1911+ Eq(mir_surface_focused));
1912+}
1913
1914=== modified file 'tests/integration-tests/test_surface_stack_with_compositor.cpp'
1915--- tests/integration-tests/test_surface_stack_with_compositor.cpp 2015-01-14 06:39:13 +0000
1916+++ tests/integration-tests/test_surface_stack_with_compositor.cpp 2015-01-30 14:41:53 +0000
1917@@ -30,7 +30,6 @@
1918 #include "mir_test_doubles/stub_display_buffer.h"
1919 #include "mir_test_doubles/stub_buffer.h"
1920 #include "mir_test_doubles/stub_input_sender.h"
1921-#include "mir_test_doubles/null_surface_configurator.h"
1922
1923 #include <condition_variable>
1924 #include <mutex>
1925@@ -138,7 +137,6 @@
1926 mock_buffer_stream,
1927 std::shared_ptr<mir::input::InputChannel>(),
1928 std::shared_ptr<mtd::StubInputSender>(),
1929- std::make_shared<mtd::NullSurfaceConfigurator>(),
1930 std::shared_ptr<mg::CursorImage>(),
1931 null_scene_report)}
1932 {
1933
1934=== modified file 'tests/unit-tests/examples/test_demo_compositor.cpp'
1935--- tests/unit-tests/examples/test_demo_compositor.cpp 2015-01-19 09:27:46 +0000
1936+++ tests/unit-tests/examples/test_demo_compositor.cpp 2015-01-30 14:41:53 +0000
1937@@ -29,7 +29,6 @@
1938 #include "mir_test_doubles/stub_display_buffer.h"
1939 #include "mir_test_doubles/stub_buffer_stream.h"
1940 #include "mir_test_doubles/stub_renderable.h"
1941-#include "mir_test_doubles/null_surface_configurator.h"
1942 #include "mir_test/fake_shared.h"
1943
1944 #include <gtest/gtest.h>
1945@@ -71,7 +70,6 @@
1946 std::make_shared<mtd::StubBufferStream>(),
1947 std::shared_ptr<mir::input::InputChannel>(),
1948 std::shared_ptr<mir::input::InputSender>(),
1949- std::make_shared<mtd::NullSurfaceConfigurator>(),
1950 std::shared_ptr<mir::graphics::CursorImage>(),
1951 mir::report::null_scene_report()};
1952
1953
1954=== modified file 'tests/unit-tests/scene/test_basic_surface.cpp'
1955--- tests/unit-tests/scene/test_basic_surface.cpp 2015-01-22 21:44:49 +0000
1956+++ tests/unit-tests/scene/test_basic_surface.cpp 2015-01-30 14:41:53 +0000
1957@@ -24,7 +24,6 @@
1958 #include "mir/frontend/event_sink.h"
1959 #include "mir/geometry/rectangle.h"
1960 #include "mir/geometry/displacement.h"
1961-#include "mir/scene/surface_configurator.h"
1962 #include "mir/scene/null_surface_observer.h"
1963
1964 #include "mir_test_doubles/mock_buffer_stream.h"
1965@@ -80,13 +79,6 @@
1966 void handle_display_config_change(mir::graphics::DisplayConfiguration const&) override {}
1967 };
1968
1969-struct StubSurfaceConfigurator : ms::SurfaceConfigurator
1970-{
1971- int select_attribute_value(ms::Surface const&, MirSurfaceAttrib, int value) override { return value; }
1972-
1973- void attribute_set(ms::Surface const&, MirSurfaceAttrib, int) override { }
1974-};
1975-
1976 void post_a_frame(ms::BasicSurface& surface)
1977 {
1978 /*
1979@@ -108,7 +100,6 @@
1980 std::function<void()> mock_change_cb{std::bind(&MockCallback::call, &mock_callback)};
1981 std::shared_ptr<testing::NiceMock<mtd::MockBufferStream>> mock_buffer_stream =
1982 std::make_shared<testing::NiceMock<mtd::MockBufferStream>>();
1983- std::shared_ptr<StubSurfaceConfigurator> const stub_configurator = std::make_shared<StubSurfaceConfigurator>();
1984 std::shared_ptr<ms::SceneReport> const report = mr::null_scene_report();
1985 void const* compositor_id{nullptr};
1986 std::shared_ptr<ms::LegacySurfaceChangeNotification> observer =
1987@@ -123,7 +114,6 @@
1988 mock_buffer_stream,
1989 std::shared_ptr<mi::InputChannel>(),
1990 stub_input_sender,
1991- stub_configurator,
1992 std::shared_ptr<mg::CursorImage>(),
1993 report};
1994
1995@@ -153,7 +143,7 @@
1996 surfaces[i].reset(new ms::BasicSurface(
1997 name, rect, false, mock_buffer_stream,
1998 std::shared_ptr<mi::InputChannel>(), stub_input_sender,
1999- stub_configurator, std::shared_ptr<mg::CursorImage>(), report)
2000+ std::shared_ptr<mg::CursorImage>(), report)
2001 );
2002
2003 for (int j = 0; j < i; ++j)
2004@@ -173,7 +163,7 @@
2005 surfaces[i].reset(new ms::BasicSurface(
2006 name, rect, false, mock_buffer_stream,
2007 std::shared_ptr<mi::InputChannel>(), stub_input_sender,
2008- stub_configurator, std::shared_ptr<mg::CursorImage>(), report)
2009+ std::shared_ptr<mg::CursorImage>(), report)
2010 );
2011
2012 ASSERT_TRUE(surfaces[i]->compositor_snapshot(compositor_id)->id());
2013@@ -290,7 +280,6 @@
2014 mock_buffer_stream,
2015 std::shared_ptr<mi::InputChannel>(),
2016 stub_input_sender,
2017- stub_configurator,
2018 std::shared_ptr<mg::CursorImage>(),
2019 report};
2020
2021@@ -358,7 +347,6 @@
2022 mock_buffer_stream,
2023 std::shared_ptr<mi::InputChannel>(),
2024 stub_input_sender,
2025- stub_configurator,
2026 std::shared_ptr<mg::CursorImage>(),
2027 report};
2028
2029@@ -397,7 +385,6 @@
2030 mock_buffer_stream,
2031 std::shared_ptr<mi::InputChannel>(),
2032 stub_input_sender,
2033- stub_configurator,
2034 std::shared_ptr<mg::CursorImage>(),
2035 report};
2036
2037@@ -539,7 +526,6 @@
2038 mock_buffer_stream,
2039 std::shared_ptr<mi::InputChannel>(),
2040 stub_input_sender,
2041- stub_configurator,
2042 std::shared_ptr<mg::CursorImage>(),
2043 report};
2044
2045@@ -690,38 +676,6 @@
2046 INSTANTIATE_TEST_CASE_P(SurfaceFocusAttributeTest, BasicSurfaceAttributeTest,
2047 ::testing::Values(surface_focus_test_parameters));
2048
2049-TEST_F(BasicSurfaceTest, configure_returns_value_set_by_configurator)
2050-{
2051- using namespace testing;
2052-
2053- struct FocusSwappingConfigurator : public StubSurfaceConfigurator
2054- {
2055- int select_attribute_value(ms::Surface const&, MirSurfaceAttrib attrib, int value) override
2056- {
2057- if (attrib != mir_surface_attrib_focus)
2058- return value;
2059- else if (value == mir_surface_focused)
2060- return mir_surface_unfocused;
2061- else
2062- return mir_surface_focused;
2063- }
2064- };
2065-
2066- ms::BasicSurface surface{
2067- name,
2068- rect,
2069- false,
2070- mock_buffer_stream,
2071- std::shared_ptr<mi::InputChannel>(),
2072- mt::fake_shared(mock_sender),
2073- std::make_shared<FocusSwappingConfigurator>(),
2074- nullptr,
2075- report};
2076-
2077- EXPECT_EQ(mir_surface_unfocused, surface.configure(mir_surface_attrib_focus, mir_surface_focused));
2078- EXPECT_EQ(mir_surface_focused, surface.configure(mir_surface_attrib_focus, mir_surface_unfocused));
2079-}
2080-
2081 TEST_F(BasicSurfaceTest, calls_send_event_on_consume)
2082 {
2083 using namespace ::testing;
2084@@ -733,7 +687,6 @@
2085 mock_buffer_stream,
2086 std::shared_ptr<mi::InputChannel>(),
2087 mt::fake_shared(mock_sender),
2088- stub_configurator,
2089 nullptr,
2090 report};
2091
2092
2093=== modified file 'tests/unit-tests/scene/test_default_shell.cpp'
2094--- tests/unit-tests/scene/test_default_shell.cpp 2015-01-23 14:37:11 +0000
2095+++ tests/unit-tests/scene/test_default_shell.cpp 2015-01-30 14:41:53 +0000
2096@@ -33,6 +33,7 @@
2097 #include "mir_test_doubles/mock_session_listener.h"
2098 #include "mir_test_doubles/mock_surface.h"
2099 #include "mir_test_doubles/null_snapshot_strategy.h"
2100+#include "mir_test_doubles/null_surface_configurator.h"
2101 #include "mir_test_doubles/null_prompt_session_manager.h"
2102 #include "mir_test_doubles/stub_input_targeter.h"
2103
2104@@ -118,7 +119,8 @@
2105 mt::fake_shared(surface_coordinator),
2106 mt::fake_shared(session_manager),
2107 std::make_shared<mtd::NullPromptSessionManager>(),
2108- mt::fake_shared(placement_strategy)};
2109+ mt::fake_shared(placement_strategy),
2110+ std::make_shared<mtd::NullSurfaceConfigurator>()};
2111
2112 void SetUp() override
2113 {
2114
2115=== modified file 'tests/unit-tests/scene/test_session_manager.cpp'
2116--- tests/unit-tests/scene/test_session_manager.cpp 2015-01-23 14:37:11 +0000
2117+++ tests/unit-tests/scene/test_session_manager.cpp 2015-01-30 14:41:53 +0000
2118@@ -31,7 +31,6 @@
2119 #include "mir_test_doubles/mock_session_listener.h"
2120 #include "mir_test_doubles/stub_buffer_stream.h"
2121 #include "mir_test_doubles/null_snapshot_strategy.h"
2122-#include "mir_test_doubles/null_surface_configurator.h"
2123 #include "mir_test_doubles/null_session_event_sink.h"
2124
2125 #include "mir_test/fake_shared.h"
2126@@ -75,7 +74,6 @@
2127 ON_CALL(container, successor_of(_)).WillByDefault(Return((std::shared_ptr<ms::Session>())));
2128 }
2129
2130- mtd::NullSurfaceConfigurator surface_configurator;
2131 std::shared_ptr<ms::Surface> dummy_surface = std::make_shared<ms::BasicSurface>(
2132 std::string("stub"),
2133 geom::Rectangle{{},{}},
2134@@ -83,7 +81,6 @@
2135 std::make_shared<mtd::StubBufferStream>(),
2136 std::shared_ptr<mi::InputChannel>(),
2137 std::shared_ptr<mi::InputSender>(),
2138- mt::fake_shared<ms::SurfaceConfigurator>(surface_configurator),
2139 std::shared_ptr<mg::CursorImage>(),
2140 mir::report::null_scene_report());
2141 mtd::MockSurfaceCoordinator surface_coordinator;
2142
2143=== modified file 'tests/unit-tests/scene/test_surface.cpp'
2144--- tests/unit-tests/scene/test_surface.cpp 2015-01-22 21:44:49 +0000
2145+++ tests/unit-tests/scene/test_surface.cpp 2015-01-30 14:41:53 +0000
2146@@ -33,7 +33,6 @@
2147 #include "mir_test_doubles/mock_input_sender.h"
2148 #include "mir_test_doubles/stub_input_channel.h"
2149 #include "mir_test_doubles/stub_input_sender.h"
2150-#include "mir_test_doubles/null_surface_configurator.h"
2151 #include "mir_test_doubles/null_event_sink.h"
2152 #include "mir_test/fake_shared.h"
2153 #include "mir_test/event_matchers.h"
2154@@ -196,7 +195,6 @@
2155 rect, false, mock_buffer_stream,
2156 std::make_shared<mtd::StubInputChannel>(),
2157 std::make_shared<mtd::StubInputSender>(),
2158- std::make_shared<mtd::NullSurfaceConfigurator>(),
2159 nullptr /* cursor_image */, report)
2160 {
2161 }
2162@@ -457,7 +455,6 @@
2163 mock_buffer_stream,
2164 mt::fake_shared(channel),
2165 std::make_shared<mtd::StubInputSender>(),
2166- std::make_shared<mtd::NullSurfaceConfigurator>(),
2167 std::shared_ptr<mg::CursorImage>(),
2168 report);
2169
2170@@ -476,7 +473,6 @@
2171 mock_buffer_stream,
2172 std::make_shared<mtd::StubInputChannel>(),
2173 mt::fake_shared(mock_sender),
2174- std::make_shared<mtd::NullSurfaceConfigurator>(),
2175 std::shared_ptr<mg::CursorImage>(),
2176 report);
2177
2178
2179=== modified file 'tests/unit-tests/scene/test_surface_impl.cpp'
2180--- tests/unit-tests/scene/test_surface_impl.cpp 2015-01-21 00:49:28 +0000
2181+++ tests/unit-tests/scene/test_surface_impl.cpp 2015-01-30 14:41:53 +0000
2182@@ -30,8 +30,6 @@
2183 #include "mir_test_doubles/mock_input_targeter.h"
2184 #include "mir_test_doubles/stub_input_sender.h"
2185 #include "mir_test_doubles/null_event_sink.h"
2186-#include "mir_test_doubles/null_surface_configurator.h"
2187-#include "mir_test_doubles/mock_surface_configurator.h"
2188 #include "mir_test/fake_shared.h"
2189 #include "mir_test/event_matchers.h"
2190
2191@@ -79,11 +77,10 @@
2192
2193 surface = std::make_shared<ms::BasicSurface>(std::string("stub"), geom::Rectangle{{},{}}, false,
2194 buffer_stream, nullptr /* input_channel */, stub_input_sender,
2195- null_configurator, nullptr /* cursor_image */, report);
2196+ nullptr /* cursor_image */, report);
2197 }
2198
2199 mf::SurfaceId stub_id;
2200- std::shared_ptr<ms::SurfaceConfigurator> null_configurator = std::make_shared<mtd::NullSurfaceConfigurator>();
2201 std::shared_ptr<ms::SceneReport> const report = mr::null_scene_report();
2202 std::shared_ptr<mtd::StubInputSender> const stub_input_sender = std::make_shared<mtd::StubInputSender>();
2203
2204@@ -262,30 +259,6 @@
2205 surface->configure(mir_surface_attrib_focus, mir_surface_unfocused);
2206 }
2207
2208-TEST_F(Surface, configurator_selects_attribute_values)
2209-{
2210- using namespace testing;
2211-
2212- mtd::MockSurfaceConfigurator configurator;
2213-
2214- EXPECT_CALL(configurator, select_attribute_value(_, mir_surface_attrib_state, mir_surface_state_restored)).Times(1)
2215- .WillOnce(Return(mir_surface_state_minimized));
2216- EXPECT_CALL(configurator, attribute_set(_, mir_surface_attrib_state, mir_surface_state_minimized)).Times(1);
2217-
2218- ms::BasicSurface surf(
2219- std::string("stub"),
2220- geom::Rectangle{{},{}},
2221- false,
2222- buffer_stream,
2223- std::shared_ptr<mi::InputChannel>(),
2224- stub_input_sender,
2225- mt::fake_shared(configurator),
2226- std::shared_ptr<mg::CursorImage>(),
2227- report);
2228-
2229- EXPECT_EQ(mir_surface_state_minimized, surf.configure(mir_surface_attrib_state, mir_surface_state_restored));
2230-}
2231-
2232 TEST_F(Surface, take_input_focus)
2233 {
2234 using namespace ::testing;
2235@@ -307,7 +280,6 @@
2236 stub_buffer_stream,
2237 std::shared_ptr<mi::InputChannel>(),
2238 stub_input_sender,
2239- null_configurator,
2240 std::shared_ptr<mg::CursorImage>(),
2241 report);
2242
2243@@ -352,7 +324,6 @@
2244 buffer_stream,
2245 std::shared_ptr<mi::InputChannel>(),
2246 stub_input_sender,
2247- null_configurator,
2248 std::shared_ptr<mg::CursorImage>(),
2249 report);
2250
2251
2252=== modified file 'tests/unit-tests/scene/test_surface_stack.cpp'
2253--- tests/unit-tests/scene/test_surface_stack.cpp 2015-01-20 03:51:03 +0000
2254+++ tests/unit-tests/scene/test_surface_stack.cpp 2015-01-30 14:41:53 +0000
2255@@ -30,7 +30,6 @@
2256 #include "mir_test_doubles/stub_buffer_stream.h"
2257 #include "mir_test_doubles/stub_renderable.h"
2258 #include "mir_test_doubles/mock_buffer_stream.h"
2259-#include "mir_test_doubles/null_surface_configurator.h"
2260
2261 #include <gmock/gmock.h>
2262 #include <gtest/gtest.h>
2263@@ -129,7 +128,6 @@
2264 std::make_shared<mtd::StubBufferStream>(),
2265 std::shared_ptr<mir::input::InputChannel>(),
2266 std::shared_ptr<mir::input::InputSender>(),
2267- std::make_shared<mtd::NullSurfaceConfigurator>(),
2268 std::shared_ptr<mg::CursorImage>(),
2269 report);
2270
2271@@ -142,7 +140,6 @@
2272 std::make_shared<mtd::StubBufferStream>(),
2273 std::shared_ptr<mir::input::InputChannel>(),
2274 std::shared_ptr<mir::input::InputSender>(),
2275- std::make_shared<mtd::NullSurfaceConfigurator>(),
2276 std::shared_ptr<mg::CursorImage>(),
2277 report);
2278
2279@@ -155,7 +152,6 @@
2280 std::make_shared<mtd::StubBufferStream>(),
2281 std::shared_ptr<mir::input::InputChannel>(),
2282 std::shared_ptr<mir::input::InputSender>(),
2283- std::make_shared<mtd::NullSurfaceConfigurator>(),
2284 std::shared_ptr<mg::CursorImage>(),
2285 report);
2286
2287@@ -168,7 +164,6 @@
2288 std::make_shared<mtd::StubBufferStream>(),
2289 std::shared_ptr<mir::input::InputChannel>(),
2290 std::shared_ptr<mir::input::InputSender>(),
2291- std::make_shared<mtd::NullSurfaceConfigurator>(),
2292 std::shared_ptr<mg::CursorImage>(),
2293 report);
2294 }
2295@@ -344,7 +339,6 @@
2296 std::make_shared<mtd::StubBufferStream>(),
2297 std::shared_ptr<mir::input::InputChannel>(),
2298 std::shared_ptr<mir::input::InputSender>(),
2299- std::make_shared<mtd::NullSurfaceConfigurator>(),
2300 std::shared_ptr<mg::CursorImage>(),
2301 report);
2302 post_a_frame(*surface);
2303@@ -475,7 +469,6 @@
2304 std::make_shared<mtd::StubBufferStream>(),
2305 std::shared_ptr<mir::input::InputChannel>(),
2306 std::shared_ptr<mir::input::InputSender>(),
2307- std::make_shared<mtd::NullSurfaceConfigurator>(),
2308 std::shared_ptr<mg::CursorImage>(),
2309 report);
2310
2311@@ -509,7 +502,6 @@
2312 mock_stream,
2313 std::shared_ptr<mir::input::InputChannel>(),
2314 std::shared_ptr<mir::input::InputSender>(),
2315- std::make_shared<mtd::NullSurfaceConfigurator>(),
2316 std::shared_ptr<mg::CursorImage>(),
2317 report);
2318 post_a_frame(*surface);
2319@@ -541,7 +533,6 @@
2320 mock_stream,
2321 std::shared_ptr<mir::input::InputChannel>(),
2322 std::shared_ptr<mir::input::InputSender>(),
2323- std::make_shared<mtd::NullSurfaceConfigurator>(),
2324 std::shared_ptr<mg::CursorImage>(),
2325 report);
2326 post_a_frame(*surface);
2327@@ -567,7 +558,6 @@
2328 {},
2329 {},
2330 {},
2331- {},
2332 mir::report::null_scene_report())
2333 {
2334 }

Subscribers

People subscribed via source and target branches