Mir

Code review comment for lp:~raof/mir/waylanding-again

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Close, just a few nits...

=== modified file 'tests/mir_test_framework/CMakeLists.txt'
--- tests/mir_test_framework/CMakeLists.txt 2017-08-30 11:59:08 +0000
+++ tests/mir_test_framework/CMakeLists.txt 2017-09-06 06:18:29 +0000
@@ -85,6 +85,7 @@

 target_link_libraries(mir-test-framework-static

+ mirserver

Not needed

~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+/*
+ * Copyright © 2015 Canonical Ltd.

Probably want 2017 too.

+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 3,

2 or 3

+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Authored by: Christopher James Halse Rogers <email address hidden>
+ */
+
+#include "mir/default_server_configuration.h"
+#include "wayland_connector.h"
+
+#include "../../scene/mediating_display_changer.h"

#include "mir/frontend/display_changer.h"

+#include "mir/graphics/platform.h"
+
+namespace mf = mir::frontend;
+
+std::shared_ptr<mf::Connector>
+ mir::DefaultServerConfiguration::the_wayland_connector()
+{
+ return wayland_connector(
+ [this]() -> std::shared_ptr<mf::Connector>
+ {
+ return std::make_shared<mf::WaylandConnector>(
+ the_frontend_shell(),
+ *the_mediating_display_changer(),

                *the_frontend_display_changer(),

(Do we really want to avoid sharing ownership? Where's the lifetime guarantee?)

+ the_buffer_allocator());
+ });
+}

~~~~~~~~~~~~~~~~~~~~~~~~~~~~

=== added file 'src/server/frontend/wayland/core_generated_interfaces.h'

Could benefit from a header comment to say it is generated.

The generated code uses a lot of reinterpret_cast<> where static_cast<> is all that is needed to downcast from void*.

review: Needs Fixing

« Back to merge proposal