Mir

Merge lp:~alan-griffiths/mir/move-miral-to-mir-cleanup-mirserver into lp:mir

Proposed by Alan Griffiths on 2017-08-30
Status: Superseded
Proposed branch: lp:~alan-griffiths/mir/move-miral-to-mir-cleanup-mirserver
Merge into: lp:mir
Prerequisite: lp:~alan-griffiths/mir/move-miral-to-mir-cleanup
Diff against target: 229 lines (+40/-51)
9 files modified
examples/CMakeLists.txt (+0/-3)
examples/server_minimal.cpp (+0/-39)
src/server/shell/CMakeLists.txt (+0/-2)
src/server/shell/default_configuration.cpp (+5/-7)
tests/include/mir_test_framework/stubbed_server_configuration.h (+1/-0)
tests/mir_test_framework/CMakeLists.txt (+2/-0)
tests/mir_test_framework/async_server_runner.cpp (+11/-0)
tests/mir_test_framework/headless_in_process_server.cpp (+12/-0)
tests/mir_test_framework/stubbed_server_configuration.cpp (+9/-0)
To merge this branch: bzr merge lp:~alan-griffiths/mir/move-miral-to-mir-cleanup-mirserver
Reviewer Review Type Date Requested Status
Mir CI Bot continuous-integration Approve on 2017-08-30
Mir development team 2017-08-30 Pending
Review via email: mp+329905@code.launchpad.net

Commit message

Remove unused window management support from libmirserver

Description of the change

Incorporate miral project into mir source tree

This is a second pass at removing code obsoleted by MirAL

To post a comment you must log in.
4235. By Alan Griffiths on 2017-08-30

  remove mir_demo_server_minimal

4236. By Alan Griffiths on 2017-08-30

  Remove use of mir::shell::CanonicalWindowManager (except in tests)

4237. By Alan Griffiths on 2017-08-30

  Move msh::BasicWindowManager and msh::CanonicalWindowManager out of libmirserver

4238. By Alan Griffiths on 2017-08-30

  remove mir_demo_server_minimal

Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:4241
https://mir-jenkins.ubuntu.com/job/mir-ci/3607/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4931
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5156
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5146
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5146
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5146
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/4970
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/4970/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4970
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4970/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/4970
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/4970/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/4970
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/4970/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4970
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4970/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/4970
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/4970/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4970
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4970/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/4970
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/4970/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3607/rebuild

review: Approve (continuous-integration)
4239. By Alan Griffiths on 2017-08-30

merge lp:~alan-griffiths/mir/move-miral-to-mir-cleanup

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'examples/CMakeLists.txt'
2--- examples/CMakeLists.txt 2017-08-30 12:39:00 +0000
3+++ examples/CMakeLists.txt 2017-08-30 12:39:00 +0000
4@@ -202,9 +202,6 @@
5 dl
6 )
7
8-mir_add_wrapped_executable(mir_demo_server_minimal server_minimal.cpp)
9-target_link_libraries(mir_demo_server_minimal mirserver)
10-
11 if (MIR_ENABLE_TESTS)
12 add_executable(mir_symbol_test
13 uses_non_client_symbol.cpp
14
15=== removed file 'examples/server_minimal.cpp'
16--- examples/server_minimal.cpp 2017-07-28 17:00:43 +0000
17+++ examples/server_minimal.cpp 1970-01-01 00:00:00 +0000
18@@ -1,39 +0,0 @@
19-/*
20- * Copyright © 2014 Canonical Ltd.
21- *
22- * This program is free software: you can redistribute it and/or modify
23- * it under the terms of the GNU General Public License version 2 or 3 as
24- * published by the Free Software Foundation.
25- *
26- * This program is distributed in the hope that it will be useful,
27- * but WITHOUT ANY WARRANTY; without even the implied warranty of
28- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29- * GNU General Public License for more details.
30- *
31- * You should have received a copy of the GNU General Public License
32- * along with this program. If not, see <http://www.gnu.org/licenses/>.
33- *
34- * Authored by: Daniel van Vugt <daniel.van.vugt@canonical.com>
35- */
36-
37-#include "mir/server.h"
38-#include "mir/report_exception.h"
39-
40-#include <cstdlib>
41-
42-///\example server_minimal.cpp
43-/// A minimal server illustrating default operation
44-int main(int argc, char const* argv[])
45-try
46-{
47- mir::Server server;
48- server.set_command_line(argc, argv);
49- server.apply_settings();
50- server.run();
51- return server.exited_normally() ? EXIT_SUCCESS : EXIT_FAILURE;
52-}
53-catch (...)
54-{
55- mir::report_exception();
56- return EXIT_FAILURE;
57-}
58
59=== added directory 'include/test/mir/shell'
60=== renamed file 'include/server/mir/shell/basic_window_manager.h' => 'include/test/mir/shell/basic_window_manager.h'
61=== renamed file 'include/server/mir/shell/canonical_window_manager.h' => 'include/test/mir/shell/canonical_window_manager.h'
62=== modified file 'src/server/shell/CMakeLists.txt'
63--- src/server/shell/CMakeLists.txt 2017-08-07 13:14:13 +0000
64+++ src/server/shell/CMakeLists.txt 2017-08-30 12:39:00 +0000
65@@ -2,8 +2,6 @@
66 SHELL_SOURCES
67
68 abstract_shell.cpp
69- basic_window_manager.cpp ${CMAKE_SOURCE_DIR}/include/server/mir/shell/basic_window_manager.h
70- canonical_window_manager.cpp ${CMAKE_SOURCE_DIR}/include/server/mir/shell/canonical_window_manager.h
71 frontend_shell.cpp
72 graphics_display_layout.cpp
73 graphics_display_layout.h
74
75=== modified file 'src/server/shell/default_configuration.cpp'
76--- src/server/shell/default_configuration.cpp 2017-07-28 17:00:43 +0000
77+++ src/server/shell/default_configuration.cpp 2017-08-30 12:39:00 +0000
78@@ -1,5 +1,5 @@
79 /*
80- * Copyright © 2013-2015 Canonical Ltd.
81+ * Copyright © 2013-2017 Canonical Ltd.
82 *
83 * This program is free software: you can redistribute it and/or modify it
84 * under the terms of the GNU General Public License version 2 or 3,
85@@ -16,10 +16,10 @@
86 * Authored by: Alan Griffiths <alan@octopull.co.uk>
87 */
88
89+#include <mir/shell/system_compositor_window_manager.h>
90 #include "mir/default_server_configuration.h"
91 #include "null_host_lifecycle_event_listener.h"
92
93-#include "mir/shell/canonical_window_manager.h"
94 #include "mir/input/composite_event_filter.h"
95 #include "mir/shell/abstract_shell.h"
96 #include "default_persistent_surface_store.h"
97@@ -52,13 +52,11 @@
98
99 auto mir::DefaultServerConfiguration::the_window_manager_builder() -> shell::WindowManagerBuilder
100 {
101-#pragma GCC diagnostic push
102-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
103 return [this](msh::FocusController* focus_controller)
104- { return std::make_shared<msh::CanonicalWindowManager>(
105+ { return std::make_shared<msh::SystemCompositorWindowManager>(
106 focus_controller,
107- the_shell_display_layout()); };
108-#pragma GCC diagnostic pop
109+ the_shell_display_layout(),
110+ the_session_coordinator()); };
111 }
112
113 auto mir::DefaultServerConfiguration::wrap_shell(std::shared_ptr<msh::Shell> const& wrapped) -> std::shared_ptr<msh::Shell>
114
115=== modified file 'tests/include/mir_test_framework/stubbed_server_configuration.h'
116--- tests/include/mir_test_framework/stubbed_server_configuration.h 2017-07-28 17:00:43 +0000
117+++ tests/include/mir_test_framework/stubbed_server_configuration.h 2017-08-30 12:39:00 +0000
118@@ -43,6 +43,7 @@
119 std::shared_ptr<renderer::RendererFactory> the_renderer_factory() override;
120 std::shared_ptr<input::InputManager> the_input_manager() override;
121 std::shared_ptr<shell::InputTargeter> the_input_targeter() override;
122+ shell::WindowManagerBuilder the_window_manager_builder() override;
123
124 std::shared_ptr<graphics::Cursor> the_cursor() override;
125 std::shared_ptr<logging::Logger> the_logger() override;
126
127=== modified file 'tests/mir_test_framework/CMakeLists.txt'
128--- tests/mir_test_framework/CMakeLists.txt 2017-05-08 03:04:26 +0000
129+++ tests/mir_test_framework/CMakeLists.txt 2017-08-30 12:39:00 +0000
130@@ -58,6 +58,8 @@
131 visible_surface.cpp
132 stub_client_platform_options.cpp
133 ${PROJECT_SOURCE_DIR}/include/test/mir_test_framework/stub_client_platform_options.h
134+ basic_window_manager.cpp ${PROJECT_SOURCE_DIR}/include/test/mir/shell/basic_window_manager.h
135+ canonical_window_manager.cpp ${PROJECT_SOURCE_DIR}/include/test/mir/shell/canonical_window_manager.h
136 )
137
138 # Umockdev uses glib, which uses the deprecated "register" storage qualifier
139
140=== modified file 'tests/mir_test_framework/async_server_runner.cpp'
141--- tests/mir_test_framework/async_server_runner.cpp 2017-07-28 17:00:43 +0000
142+++ tests/mir_test_framework/async_server_runner.cpp 2017-08-30 12:39:00 +0000
143@@ -24,6 +24,7 @@
144 #include "mir/geometry/rectangle.h"
145 #include "mir/options/option.h"
146 #include "mir/test/doubles/null_logger.h"
147+#include <mir/shell/canonical_window_manager.h>
148
149 #include <boost/throw_exception.hpp>
150
151@@ -31,6 +32,7 @@
152
153 namespace geom = mir::geometry;
154 namespace ml = mir::logging;
155+namespace msh = mir::shell;
156 namespace mtd = mir::test::doubles;
157 namespace mtf = mir_test_framework;
158 namespace mt = mir::test;
159@@ -54,6 +56,15 @@
160
161 return result;
162 });
163+ server.override_the_window_manager_builder([this](msh::FocusController* focus_controller)
164+ {
165+#pragma GCC diagnostic push
166+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
167+ return std::make_shared<msh::CanonicalWindowManager>(
168+ focus_controller,
169+ server.the_shell_display_layout());
170+#pragma GCC diagnostic pop
171+ });
172 }
173
174 void mtf::AsyncServerRunner::add_to_environment(char const* key, char const* value)
175
176=== renamed file 'src/server/shell/basic_window_manager.cpp' => 'tests/mir_test_framework/basic_window_manager.cpp'
177=== renamed file 'src/server/shell/canonical_window_manager.cpp' => 'tests/mir_test_framework/canonical_window_manager.cpp'
178=== modified file 'tests/mir_test_framework/headless_in_process_server.cpp'
179--- tests/mir_test_framework/headless_in_process_server.cpp 2017-07-28 17:00:43 +0000
180+++ tests/mir_test_framework/headless_in_process_server.cpp 2017-08-30 12:39:00 +0000
181@@ -18,12 +18,24 @@
182
183 #include "mir_test_framework/headless_in_process_server.h"
184 #include "mir_test_framework/stub_server_platform_factory.h"
185+#include <mir/shell/canonical_window_manager.h>
186
187 namespace mtf = mir_test_framework;
188+namespace msh = mir::shell;
189
190 mtf::HeadlessInProcessServer::HeadlessInProcessServer()
191 {
192 add_to_environment("MIR_SERVER_NO_FILE", "");
193+
194+ server.override_the_window_manager_builder([this](msh::FocusController* focus_controller)
195+ {
196+#pragma GCC diagnostic push
197+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
198+ return std::make_shared<msh::CanonicalWindowManager>(
199+ focus_controller,
200+ server.the_shell_display_layout());
201+#pragma GCC diagnostic pop
202+ });
203 }
204
205 void mtf::HeadlessInProcessServer::SetUp()
206
207=== modified file 'tests/mir_test_framework/stubbed_server_configuration.cpp'
208--- tests/mir_test_framework/stubbed_server_configuration.cpp 2017-07-28 17:00:43 +0000
209+++ tests/mir_test_framework/stubbed_server_configuration.cpp 2017-08-30 12:39:00 +0000
210@@ -23,6 +23,7 @@
211
212 #include "mir/options/default_configuration.h"
213 #include "mir/graphics/cursor.h"
214+#include "mir/shell/canonical_window_manager.h"
215
216 #include "mir/test/doubles/stub_display_buffer.h"
217 #include "mir/test/doubles/stub_renderer.h"
218@@ -135,3 +136,11 @@
219
220 return std::make_shared<mtd::NullLogger>();
221 }
222+
223+mir::shell::WindowManagerBuilder mir_test_framework::StubbedServerConfiguration::the_window_manager_builder()
224+{
225+ return [this](msh::FocusController* focus_controller)
226+ { return std::make_shared<msh::CanonicalWindowManager>(
227+ focus_controller,
228+ the_shell_display_layout()); };
229+}

Subscribers

People subscribed via source and target branches