Merge lp:~alan-griffiths/unity-mir/compatibility-with-mir-0.1.8 into lp:unity-mir

Proposed by Alan Griffiths
Status: Merged
Approved by: Gerry Boland
Approved revision: 210
Merged at revision: 211
Proposed branch: lp:~alan-griffiths/unity-mir/compatibility-with-mir-0.1.8
Merge into: lp:unity-mir
Diff against target: 267 lines (+45/-26)
11 files modified
debian/control (+4/-4)
src/modules/Unity/Application/mirsurfacemanager.cpp (+3/-1)
src/modules/Unity/Application/mirsurfacemanager.h (+2/-1)
src/unity-mir/sessionauthorizer.cpp (+8/-0)
src/unity-mir/sessionauthorizer.h (+1/-0)
src/unity-mir/shellserverconfiguration.cpp (+5/-4)
src/unity-mir/shellserverconfiguration.h (+1/-1)
src/unity-mir/surfaceconfigurator.cpp (+3/-3)
src/unity-mir/surfaceconfigurator.h (+5/-5)
src/unity-mir/surfacefactory.cpp (+10/-5)
src/unity-mir/surfacefactory.h (+3/-2)
To merge this branch: bzr merge lp:~alan-griffiths/unity-mir/compatibility-with-mir-0.1.8
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+214610@code.launchpad.net

Commit message

Compatibility with Mir 0.1.8

Description of the change

Compatibility with Mir 0.1.8

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

 * Are there any related MPs required for this MP to build/function as expected? Please list.

lp:~mir-team/mir/trunk-0.1.8

 * Did you perform an exploratory manual test run of your code change and any related functionality?

No, it is a revision of my branch tracking mir/devel that Gerry identified as matching 0.1.8.

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

n/a

Revision history for this message
Gerry Boland (gerboland) wrote :

Looks good, but could you please update the debian control file to depend on mir 0.1.8?

review: Needs Fixing
210. By Alan Griffiths

update the debian control file to depend on mir 0.1.8

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

> Looks good, but could you please update the debian control file to depend on
> mir 0.1.8?

How's this?

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote :

Perfect, thank you.

• Did you perform an exploratory manual test run of the code change and any related functionality?
Yes
• Did CI run pass? If not, please explain why.
Depends on lp:~mir-team/mir/trunk-0.1.8

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2014-03-31 15:12:18 +0000
3+++ debian/control 2014-04-08 07:51:14 +0000
4@@ -9,8 +9,8 @@
5 libboost-dev,
6 libboost-system-dev,
7 libplatform-api1-dev,
8- libmirserver-dev (>= 0.1.7),
9- libmirclient-dev (>= 0.1.7),
10+ libmirserver-dev (>= 0.1.8),
11+ libmirclient-dev (>= 0.1.8),
12 libprocess-cpp-dev,
13 libunity-api-dev (>= 7.80.6),
14 libupstart-app-launch2-dev,
15@@ -49,8 +49,8 @@
16 ${shlibs:Depends},
17 libunity-mir1 (= ${binary:Version}),
18 libupstart-app-launch2-dev,
19- libmirserver-dev (>= 0.0.11),
20- libmirclient-dev (>= 0.0.11),
21+ libmirserver-dev (>= 0.1.8),
22+ libmirclient-dev (>= 0.1.8),
23 libplatform-api1-dev,
24 qtbase5-dev,
25 Description: Qt plugins for Unity specific Mir APIs - development files
26
27=== modified file 'src/modules/Unity/Application/mirsurfacemanager.cpp'
28--- src/modules/Unity/Application/mirsurfacemanager.cpp 2014-02-28 16:51:31 +0000
29+++ src/modules/Unity/Application/mirsurfacemanager.cpp 2014-04-08 07:51:14 +0000
30@@ -33,8 +33,10 @@
31
32 // mir
33 #include <mir/shell/session.h>
34+#include <mir/scene/surface.h>
35
36 namespace msh = mir::shell;
37+namespace ms = mir::scene;
38
39 namespace unitymir
40 {
41@@ -141,7 +143,7 @@
42 Q_EMIT shellSurfaceChanged(m_shellSurface);
43 }
44
45-void MirSurfaceManager::surfaceAttributeChanged(const msh::Surface *surface, const MirSurfaceAttrib attribute, const int value)
46+void MirSurfaceManager::surfaceAttributeChanged(const ms::Surface *surface, const MirSurfaceAttrib attribute, const int value)
47 {
48 DLOG("MirSurfaceManager::surfaceAttributeChanged (this=%p, attrib=%d, value=%d)",
49 this, static_cast<int>(attribute), value);
50
51=== modified file 'src/modules/Unity/Application/mirsurfacemanager.h'
52--- src/modules/Unity/Application/mirsurfacemanager.h 2014-02-28 16:51:31 +0000
53+++ src/modules/Unity/Application/mirsurfacemanager.h 2014-04-08 07:51:14 +0000
54@@ -29,6 +29,7 @@
55 // local
56 #include "mirsurface.h"
57
58+namespace mir { namespace scene { class Surface; }}
59 namespace mir { namespace shell { class Surface; class Session; }}
60 class ShellServerConfiguration;
61
62@@ -61,7 +62,7 @@
63 void sessionDestroyingSurface(mir::shell::Session const*, std::shared_ptr<mir::shell::Surface> const&);
64 void shellSurfaceCreated(std::shared_ptr<mir::shell::Surface> const&);
65
66- void surfaceAttributeChanged(mir::shell::Surface const*, MirSurfaceAttrib, int);
67+ void surfaceAttributeChanged(mir::scene::Surface const*, MirSurfaceAttrib, int);
68
69 private:
70 QHash<const mir::shell::Surface *, MirSurface *> m_surfaces;
71
72=== modified file 'src/unity-mir/sessionauthorizer.cpp'
73--- src/unity-mir/sessionauthorizer.cpp 2013-10-29 10:12:40 +0000
74+++ src/unity-mir/sessionauthorizer.cpp 2014-04-08 07:51:14 +0000
75@@ -43,3 +43,11 @@
76 Q_UNUSED(pid)
77 return true;
78 }
79+
80+bool SessionAuthorizer::screencast_is_allowed(pid_t pid)
81+{
82+ DLOG("SessionAuthorizer::screencast_is_allowed (this=%p, pid=%d)", this, pid);
83+ Q_UNUSED(pid)
84+ return true;
85+}
86+
87
88=== modified file 'src/unity-mir/sessionauthorizer.h'
89--- src/unity-mir/sessionauthorizer.h 2013-10-29 10:12:40 +0000
90+++ src/unity-mir/sessionauthorizer.h 2014-04-08 07:51:14 +0000
91@@ -36,6 +36,7 @@
92
93 virtual bool connection_is_allowed(pid_t pid) override;
94 virtual bool configure_display_is_allowed(pid_t pid) override;
95+ virtual bool screencast_is_allowed(pid_t pid) override;
96
97 Q_SIGNALS:
98 // needs to be blocked queued signal which returns value for authorized
99
100=== modified file 'src/unity-mir/shellserverconfiguration.cpp'
101--- src/unity-mir/shellserverconfiguration.cpp 2014-02-19 23:28:21 +0000
102+++ src/unity-mir/shellserverconfiguration.cpp 2014-04-08 07:51:14 +0000
103@@ -30,6 +30,7 @@
104
105 namespace mg = mir::graphics;
106 namespace msh = mir::shell;
107+namespace ms = mir::scene;
108
109 ShellServerConfiguration::ShellServerConfiguration(int argc, char const* argv[], QObject* parent)
110 : QObject(parent)
111@@ -74,10 +75,10 @@
112 });
113 }
114
115-std::shared_ptr<msh::SurfaceConfigurator>
116-ShellServerConfiguration::the_shell_surface_configurator()
117+std::shared_ptr<ms::SurfaceConfigurator>
118+ShellServerConfiguration::the_surface_configurator()
119 {
120- return shell_surface_configurator(
121+ return surface_configurator(
122 [this]()
123 {
124 return std::make_shared<SurfaceConfigurator>();
125@@ -180,7 +181,7 @@
126
127 SurfaceConfigurator *ShellServerConfiguration::surfaceConfigurator()
128 {
129- auto sharedPtr = the_shell_surface_configurator();
130+ auto sharedPtr = the_surface_configurator();
131 if (sharedPtr.unique()) return 0;
132
133 return static_cast<SurfaceConfigurator*>(sharedPtr.get());
134
135=== modified file 'src/unity-mir/shellserverconfiguration.h'
136--- src/unity-mir/shellserverconfiguration.h 2014-02-19 23:28:21 +0000
137+++ src/unity-mir/shellserverconfiguration.h 2014-04-08 07:51:14 +0000
138@@ -50,7 +50,7 @@
139 std::shared_ptr<mir::graphics::DisplayConfigurationPolicy> the_display_configuration_policy() override;
140 std::shared_ptr<mir::shell::PlacementStrategy> the_shell_placement_strategy() override;
141 std::shared_ptr<mir::shell::SessionListener> the_shell_session_listener() override;
142- std::shared_ptr<mir::shell::SurfaceConfigurator> the_shell_surface_configurator() override;
143+ std::shared_ptr<mir::scene::SurfaceConfigurator> the_surface_configurator() override;
144 std::shared_ptr<mir::shell::SurfaceFactory> the_shell_surface_factory() override;
145 std::shared_ptr<mir::shell::FocusSetter> the_shell_focus_setter() override;
146 std::shared_ptr<mir::ServerStatusListener> the_server_status_listener() override;
147
148=== modified file 'src/unity-mir/surfaceconfigurator.cpp'
149--- src/unity-mir/surfaceconfigurator.cpp 2013-08-20 11:46:07 +0000
150+++ src/unity-mir/surfaceconfigurator.cpp 2014-04-08 07:51:14 +0000
151@@ -16,19 +16,19 @@
152
153 #include "surfaceconfigurator.h"
154
155-namespace msh = mir::shell;
156+namespace ms = mir::scene;
157
158 SurfaceConfigurator::SurfaceConfigurator()
159 {
160 qRegisterMetaType<MirSurfaceAttrib>("MirSurfaceAttrib");
161 }
162
163-int SurfaceConfigurator::select_attribute_value(msh::Surface const&, MirSurfaceAttrib, int requested_value)
164+int SurfaceConfigurator::select_attribute_value(ms::Surface const&, MirSurfaceAttrib, int requested_value)
165 {
166 return requested_value;
167 }
168
169-void SurfaceConfigurator::attribute_set(msh::Surface const& surface, MirSurfaceAttrib attrib, int value)
170+void SurfaceConfigurator::attribute_set(ms::Surface const& surface, MirSurfaceAttrib attrib, int value)
171 {
172 Q_EMIT surfaceAttributeChanged(&surface, attrib, value);
173 }
174
175=== modified file 'src/unity-mir/surfaceconfigurator.h'
176--- src/unity-mir/surfaceconfigurator.h 2013-08-20 11:46:07 +0000
177+++ src/unity-mir/surfaceconfigurator.h 2014-04-08 07:51:14 +0000
178@@ -19,23 +19,23 @@
179
180 #include <QObject>
181
182-#include <mir/shell/surface_configurator.h>
183+#include <mir/scene/surface_configurator.h>
184 #include <mir_toolkit/common.h>
185
186 namespace mir { namespace shell { class Surface; }}
187
188-class SurfaceConfigurator : public QObject, public mir::shell::SurfaceConfigurator
189+class SurfaceConfigurator : public QObject, public mir::scene::SurfaceConfigurator
190 {
191 Q_OBJECT
192
193 public:
194 SurfaceConfigurator();
195
196- int select_attribute_value(mir::shell::Surface const&, MirSurfaceAttrib, int) override;
197- void attribute_set(mir::shell::Surface const&, MirSurfaceAttrib, int) override;
198+ int select_attribute_value(mir::scene::Surface const&, MirSurfaceAttrib, int) override;
199+ void attribute_set(mir::scene::Surface const&, MirSurfaceAttrib, int) override;
200
201 Q_SIGNALS:
202- void surfaceAttributeChanged(mir::shell::Surface const*, const MirSurfaceAttrib, const int);
203+ void surfaceAttributeChanged(mir::scene::Surface const*, const MirSurfaceAttrib, const int);
204 };
205
206 #endif // SURFACECONFIGURATOR_H
207
208=== modified file 'src/unity-mir/surfacefactory.cpp'
209--- src/unity-mir/surfacefactory.cpp 2014-01-09 16:09:10 +0000
210+++ src/unity-mir/surfacefactory.cpp 2014-04-08 07:51:14 +0000
211@@ -40,8 +40,7 @@
212 SurfaceFactory::create_surface(
213 mir::shell::Session *session,
214 msh::SurfaceCreationParameters const& params,
215- mir::frontend::SurfaceId id,
216- std::shared_ptr<mir::frontend::EventSink> const& sink)
217+ std::shared_ptr<mir::scene::SurfaceObserver> const& observer)
218 {
219 DLOG("SurfaceFactory::create_surface");
220 static const msc::DepthId shellSurfaceDepth{1};
221@@ -55,7 +54,7 @@
222 auto newParams = params;
223 newParams.depth = shellSurfaceDepth;
224 newParams.input_mode = mir::input::InputReceptionMode::receives_all_input;
225- m_shellSurface = m_surfaceFactory->create_surface(session, newParams, id, sink);
226+ m_shellSurface = m_surfaceFactory->create_surface(session, newParams, observer);
227 shellSurfaceFound = true;
228 Q_EMIT shellSurfaceCreated(m_shellSurface);
229 return m_shellSurface;
230@@ -63,13 +62,19 @@
231 DLOG("OSK depth");
232 auto newParams = params;
233 newParams.depth = oskSurfaceDepth;
234- return m_surfaceFactory->create_surface(session, newParams, id, sink);
235+ return m_surfaceFactory->create_surface(session, newParams, observer);
236 } else {
237 DLOG("Default depth");
238- return m_surfaceFactory->create_surface(session, params, id, sink);
239+ return m_surfaceFactory->create_surface(session, params, observer);
240 }
241 }
242
243+void SurfaceFactory::destroy_surface(std::shared_ptr<mir::shell::Surface> const& surface)
244+{
245+ DLOG("SurfaceFactory::destroy_surface");
246+ m_surfaceFactory->destroy_surface(surface);
247+}
248+
249 std::shared_ptr<mir::shell::Surface> SurfaceFactory::shellSurface() const
250 {
251 return m_shellSurface;
252
253=== modified file 'src/unity-mir/surfacefactory.h'
254--- src/unity-mir/surfacefactory.h 2014-01-09 16:09:10 +0000
255+++ src/unity-mir/surfacefactory.h 2014-04-08 07:51:14 +0000
256@@ -36,8 +36,9 @@
257 std::shared_ptr<mir::shell::Surface> create_surface(
258 mir::shell::Session* session,
259 mir::shell::SurfaceCreationParameters const& params,
260- mir::frontend::SurfaceId id,
261- std::shared_ptr<mir::frontend::EventSink> const& sink) override;
262+ std::shared_ptr<mir::scene::SurfaceObserver> const& observer) override;
263+
264+ void destroy_surface(std::shared_ptr<mir::shell::Surface> const& surface) override;
265
266 // Called by shell
267 std::shared_ptr<mir::shell::Surface> shellSurface() const;

Subscribers

People subscribed via source and target branches