Mir

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

Proposed by Alan Griffiths
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
Mir development team 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.
Revision history for this message
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)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'examples/CMakeLists.txt'
--- examples/CMakeLists.txt 2017-08-30 12:39:00 +0000
+++ examples/CMakeLists.txt 2017-08-30 12:39:00 +0000
@@ -202,9 +202,6 @@
202 dl202 dl
203)203)
204204
205mir_add_wrapped_executable(mir_demo_server_minimal server_minimal.cpp)
206target_link_libraries(mir_demo_server_minimal mirserver)
207
208if (MIR_ENABLE_TESTS)205if (MIR_ENABLE_TESTS)
209 add_executable(mir_symbol_test206 add_executable(mir_symbol_test
210 uses_non_client_symbol.cpp207 uses_non_client_symbol.cpp
211208
=== removed file 'examples/server_minimal.cpp'
--- examples/server_minimal.cpp 2017-07-28 17:00:43 +0000
+++ examples/server_minimal.cpp 1970-01-01 00:00:00 +0000
@@ -1,39 +0,0 @@
1/*
2 * Copyright © 2014 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 or 3 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authored by: Daniel van Vugt <daniel.van.vugt@canonical.com>
17 */
18
19#include "mir/server.h"
20#include "mir/report_exception.h"
21
22#include <cstdlib>
23
24///\example server_minimal.cpp
25/// A minimal server illustrating default operation
26int main(int argc, char const* argv[])
27try
28{
29 mir::Server server;
30 server.set_command_line(argc, argv);
31 server.apply_settings();
32 server.run();
33 return server.exited_normally() ? EXIT_SUCCESS : EXIT_FAILURE;
34}
35catch (...)
36{
37 mir::report_exception();
38 return EXIT_FAILURE;
39}
400
=== added directory 'include/test/mir/shell'
=== renamed file 'include/server/mir/shell/basic_window_manager.h' => 'include/test/mir/shell/basic_window_manager.h'
=== renamed file 'include/server/mir/shell/canonical_window_manager.h' => 'include/test/mir/shell/canonical_window_manager.h'
=== modified file 'src/server/shell/CMakeLists.txt'
--- src/server/shell/CMakeLists.txt 2017-08-07 13:14:13 +0000
+++ src/server/shell/CMakeLists.txt 2017-08-30 12:39:00 +0000
@@ -2,8 +2,6 @@
2 SHELL_SOURCES2 SHELL_SOURCES
33
4 abstract_shell.cpp4 abstract_shell.cpp
5 basic_window_manager.cpp ${CMAKE_SOURCE_DIR}/include/server/mir/shell/basic_window_manager.h
6 canonical_window_manager.cpp ${CMAKE_SOURCE_DIR}/include/server/mir/shell/canonical_window_manager.h
7 frontend_shell.cpp5 frontend_shell.cpp
8 graphics_display_layout.cpp6 graphics_display_layout.cpp
9 graphics_display_layout.h7 graphics_display_layout.h
108
=== modified file 'src/server/shell/default_configuration.cpp'
--- src/server/shell/default_configuration.cpp 2017-07-28 17:00:43 +0000
+++ src/server/shell/default_configuration.cpp 2017-08-30 12:39:00 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright © 2013-2015 Canonical Ltd.2 * Copyright © 2013-2017 Canonical Ltd.
3 *3 *
4 * This program is free software: you can redistribute it and/or modify it4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 2 or 3,5 * under the terms of the GNU General Public License version 2 or 3,
@@ -16,10 +16,10 @@
16 * Authored by: Alan Griffiths <alan@octopull.co.uk>16 * Authored by: Alan Griffiths <alan@octopull.co.uk>
17 */17 */
1818
19#include <mir/shell/system_compositor_window_manager.h>
19#include "mir/default_server_configuration.h"20#include "mir/default_server_configuration.h"
20#include "null_host_lifecycle_event_listener.h"21#include "null_host_lifecycle_event_listener.h"
2122
22#include "mir/shell/canonical_window_manager.h"
23#include "mir/input/composite_event_filter.h"23#include "mir/input/composite_event_filter.h"
24#include "mir/shell/abstract_shell.h"24#include "mir/shell/abstract_shell.h"
25#include "default_persistent_surface_store.h"25#include "default_persistent_surface_store.h"
@@ -52,13 +52,11 @@
5252
53auto mir::DefaultServerConfiguration::the_window_manager_builder() -> shell::WindowManagerBuilder53auto mir::DefaultServerConfiguration::the_window_manager_builder() -> shell::WindowManagerBuilder
54{54{
55#pragma GCC diagnostic push
56#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
57 return [this](msh::FocusController* focus_controller)55 return [this](msh::FocusController* focus_controller)
58 { return std::make_shared<msh::CanonicalWindowManager>(56 { return std::make_shared<msh::SystemCompositorWindowManager>(
59 focus_controller,57 focus_controller,
60 the_shell_display_layout()); };58 the_shell_display_layout(),
61#pragma GCC diagnostic pop59 the_session_coordinator()); };
62}60}
6361
64auto mir::DefaultServerConfiguration::wrap_shell(std::shared_ptr<msh::Shell> const& wrapped) -> std::shared_ptr<msh::Shell>62auto mir::DefaultServerConfiguration::wrap_shell(std::shared_ptr<msh::Shell> const& wrapped) -> std::shared_ptr<msh::Shell>
6563
=== modified file 'tests/include/mir_test_framework/stubbed_server_configuration.h'
--- tests/include/mir_test_framework/stubbed_server_configuration.h 2017-07-28 17:00:43 +0000
+++ tests/include/mir_test_framework/stubbed_server_configuration.h 2017-08-30 12:39:00 +0000
@@ -43,6 +43,7 @@
43 std::shared_ptr<renderer::RendererFactory> the_renderer_factory() override;43 std::shared_ptr<renderer::RendererFactory> the_renderer_factory() override;
44 std::shared_ptr<input::InputManager> the_input_manager() override;44 std::shared_ptr<input::InputManager> the_input_manager() override;
45 std::shared_ptr<shell::InputTargeter> the_input_targeter() override;45 std::shared_ptr<shell::InputTargeter> the_input_targeter() override;
46 shell::WindowManagerBuilder the_window_manager_builder() override;
4647
47 std::shared_ptr<graphics::Cursor> the_cursor() override;48 std::shared_ptr<graphics::Cursor> the_cursor() override;
48 std::shared_ptr<logging::Logger> the_logger() override;49 std::shared_ptr<logging::Logger> the_logger() override;
4950
=== modified file 'tests/mir_test_framework/CMakeLists.txt'
--- tests/mir_test_framework/CMakeLists.txt 2017-05-08 03:04:26 +0000
+++ tests/mir_test_framework/CMakeLists.txt 2017-08-30 12:39:00 +0000
@@ -58,6 +58,8 @@
58 visible_surface.cpp58 visible_surface.cpp
59 stub_client_platform_options.cpp59 stub_client_platform_options.cpp
60 ${PROJECT_SOURCE_DIR}/include/test/mir_test_framework/stub_client_platform_options.h60 ${PROJECT_SOURCE_DIR}/include/test/mir_test_framework/stub_client_platform_options.h
61 basic_window_manager.cpp ${PROJECT_SOURCE_DIR}/include/test/mir/shell/basic_window_manager.h
62 canonical_window_manager.cpp ${PROJECT_SOURCE_DIR}/include/test/mir/shell/canonical_window_manager.h
61)63)
6264
63# Umockdev uses glib, which uses the deprecated "register" storage qualifier65# Umockdev uses glib, which uses the deprecated "register" storage qualifier
6466
=== modified file 'tests/mir_test_framework/async_server_runner.cpp'
--- tests/mir_test_framework/async_server_runner.cpp 2017-07-28 17:00:43 +0000
+++ tests/mir_test_framework/async_server_runner.cpp 2017-08-30 12:39:00 +0000
@@ -24,6 +24,7 @@
24#include "mir/geometry/rectangle.h"24#include "mir/geometry/rectangle.h"
25#include "mir/options/option.h"25#include "mir/options/option.h"
26#include "mir/test/doubles/null_logger.h"26#include "mir/test/doubles/null_logger.h"
27#include <mir/shell/canonical_window_manager.h>
2728
28#include <boost/throw_exception.hpp>29#include <boost/throw_exception.hpp>
2930
@@ -31,6 +32,7 @@
3132
32namespace geom = mir::geometry;33namespace geom = mir::geometry;
33namespace ml = mir::logging;34namespace ml = mir::logging;
35namespace msh = mir::shell;
34namespace mtd = mir::test::doubles;36namespace mtd = mir::test::doubles;
35namespace mtf = mir_test_framework;37namespace mtf = mir_test_framework;
36namespace mt = mir::test;38namespace mt = mir::test;
@@ -54,6 +56,15 @@
5456
55 return result;57 return result;
56 });58 });
59 server.override_the_window_manager_builder([this](msh::FocusController* focus_controller)
60 {
61#pragma GCC diagnostic push
62#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
63 return std::make_shared<msh::CanonicalWindowManager>(
64 focus_controller,
65 server.the_shell_display_layout());
66#pragma GCC diagnostic pop
67 });
57}68}
5869
59void mtf::AsyncServerRunner::add_to_environment(char const* key, char const* value)70void mtf::AsyncServerRunner::add_to_environment(char const* key, char const* value)
6071
=== renamed file 'src/server/shell/basic_window_manager.cpp' => 'tests/mir_test_framework/basic_window_manager.cpp'
=== renamed file 'src/server/shell/canonical_window_manager.cpp' => 'tests/mir_test_framework/canonical_window_manager.cpp'
=== modified file 'tests/mir_test_framework/headless_in_process_server.cpp'
--- tests/mir_test_framework/headless_in_process_server.cpp 2017-07-28 17:00:43 +0000
+++ tests/mir_test_framework/headless_in_process_server.cpp 2017-08-30 12:39:00 +0000
@@ -18,12 +18,24 @@
1818
19#include "mir_test_framework/headless_in_process_server.h"19#include "mir_test_framework/headless_in_process_server.h"
20#include "mir_test_framework/stub_server_platform_factory.h"20#include "mir_test_framework/stub_server_platform_factory.h"
21#include <mir/shell/canonical_window_manager.h>
2122
22namespace mtf = mir_test_framework;23namespace mtf = mir_test_framework;
24namespace msh = mir::shell;
2325
24mtf::HeadlessInProcessServer::HeadlessInProcessServer()26mtf::HeadlessInProcessServer::HeadlessInProcessServer()
25{27{
26 add_to_environment("MIR_SERVER_NO_FILE", "");28 add_to_environment("MIR_SERVER_NO_FILE", "");
29
30 server.override_the_window_manager_builder([this](msh::FocusController* focus_controller)
31 {
32#pragma GCC diagnostic push
33#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
34 return std::make_shared<msh::CanonicalWindowManager>(
35 focus_controller,
36 server.the_shell_display_layout());
37#pragma GCC diagnostic pop
38 });
27}39}
2840
29void mtf::HeadlessInProcessServer::SetUp()41void mtf::HeadlessInProcessServer::SetUp()
3042
=== modified file 'tests/mir_test_framework/stubbed_server_configuration.cpp'
--- tests/mir_test_framework/stubbed_server_configuration.cpp 2017-07-28 17:00:43 +0000
+++ tests/mir_test_framework/stubbed_server_configuration.cpp 2017-08-30 12:39:00 +0000
@@ -23,6 +23,7 @@
2323
24#include "mir/options/default_configuration.h"24#include "mir/options/default_configuration.h"
25#include "mir/graphics/cursor.h"25#include "mir/graphics/cursor.h"
26#include "mir/shell/canonical_window_manager.h"
2627
27#include "mir/test/doubles/stub_display_buffer.h"28#include "mir/test/doubles/stub_display_buffer.h"
28#include "mir/test/doubles/stub_renderer.h"29#include "mir/test/doubles/stub_renderer.h"
@@ -135,3 +136,11 @@
135136
136 return std::make_shared<mtd::NullLogger>();137 return std::make_shared<mtd::NullLogger>();
137}138}
139
140mir::shell::WindowManagerBuilder mir_test_framework::StubbedServerConfiguration::the_window_manager_builder()
141{
142 return [this](msh::FocusController* focus_controller)
143 { return std::make_shared<msh::CanonicalWindowManager>(
144 focus_controller,
145 the_shell_display_layout()); };
146}

Subscribers

People subscribed via source and target branches