Merge lp:~alan-griffiths/unity-system-compositor/dont-use-ApplicationSession into lp:unity-system-compositor

Proposed by Alan Griffiths
Status: Merged
Approved by: kevin gunn
Approved revision: 99
Merged at revision: 103
Proposed branch: lp:~alan-griffiths/unity-system-compositor/dont-use-ApplicationSession
Merge into: lp:unity-system-compositor
Diff against target: 79 lines (+7/-17)
3 files modified
src/dm_connection.h (+0/-7)
src/system_compositor.cpp (+5/-8)
src/system_compositor.h (+2/-2)
To merge this branch: bzr merge lp:~alan-griffiths/unity-system-compositor/dont-use-ApplicationSession
Reviewer Review Type Date Requested Status
Thomas Voß (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Robert Carr (community) Approve
Review via email: mp+193070@code.launchpad.net

Commit message

ApplicationSession is a Mir implementation class that shouldn't be used by USC. Use shell::Session instead

Description of the change

ApplicationSession is a Mir implementation class that shouldn't be used by USC. Use shell::Session instead

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
Robert Carr (robertcarr) wrote :

LGTM. Needs mir merge from dev branch to build though.

Revision history for this message
Robert Carr (robertcarr) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
95. By Alan Griffiths

merge lp:unity-system-compositor

96. By Alan Griffiths

Delete unused code

97. By Alan Griffiths

mir/shell/focus_setter.h has gone private, use mir/shell/focus_controller.h instead

98. By Alan Griffiths

merge lp:~alan-griffiths/unity-system-compositor/fix-local-build

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

Don't use FocusSetter either - use FocusController instead.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
99. By Alan Griffiths

merge lp:unity-system-compositor

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Thomas Voß (thomas-voss) wrote :

LGTM, tested locally and works.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/dm_connection.h'
--- src/dm_connection.h 2013-07-09 19:18:59 +0000
+++ src/dm_connection.h 2013-11-20 11:00:31 +0000
@@ -28,13 +28,6 @@
28 virtual void set_next_session(std::string client_name) = 0;28 virtual void set_next_session(std::string client_name) = 0;
29};29};
3030
31class NullDMMessageHandler : public DMMessageHandler
32{
33public:
34 void set_active_session(std::string client_name) {};
35 void set_next_session(std::string client_name) {};
36};
37
38enum class USCMessageID31enum class USCMessageID
39{32{
40 ping = 0,33 ping = 0,
4134
=== modified file 'src/system_compositor.cpp'
--- src/system_compositor.cpp 2013-11-05 23:36:07 +0000
+++ src/system_compositor.cpp 2013-11-20 11:00:31 +0000
@@ -22,10 +22,9 @@
22#include <mir/run_mir.h>22#include <mir/run_mir.h>
23#include <mir/abnormal_exit.h>23#include <mir/abnormal_exit.h>
24#include <mir/server_status_listener.h>24#include <mir/server_status_listener.h>
25#include <mir/shell/application_session.h>
26#include <mir/shell/session.h>25#include <mir/shell/session.h>
27#include <mir/shell/session_container.h>26#include <mir/shell/session_container.h>
28#include <mir/shell/focus_setter.h>27#include <mir/shell/focus_controller.h>
29#include <mir/input/cursor_listener.h>28#include <mir/input/cursor_listener.h>
3029
31#include <cerrno>30#include <cerrno>
@@ -238,19 +237,17 @@
238 active_session.reset();237 active_session.reset();
239 config->the_shell_session_container()->for_each([&](std::shared_ptr<msh::Session> const& s)238 config->the_shell_session_container()->for_each([&](std::shared_ptr<msh::Session> const& s)
240 {239 {
241 auto app_session(std::static_pointer_cast<msh::ApplicationSession>(s));
242
243 if (s->name() == client_name)240 if (s->name() == client_name)
244 {241 {
245 app_session->set_lifecycle_state(mir_lifecycle_state_resumed);242 s->set_lifecycle_state(mir_lifecycle_state_resumed);
246 active_session = app_session;243 active_session = s;
247 }244 }
248 else245 else
249 app_session->set_lifecycle_state(mir_lifecycle_state_will_suspend);246 s->set_lifecycle_state(mir_lifecycle_state_will_suspend);
250 });247 });
251248
252 if (active_session)249 if (active_session)
253 config->the_shell_focus_setter()->set_focus_to(active_session);250 config->the_focus_controller()->set_focus_to(active_session);
254 else251 else
255 std::cerr << "Unable to set active session, unknown client name " << client_name << std::endl;252 std::cerr << "Unable to set active session, unknown client name " << client_name << std::endl;
256}253}
257254
=== modified file 'src/system_compositor.h'
--- src/system_compositor.h 2013-10-31 22:35:26 +0000
+++ src/system_compositor.h 2013-11-20 11:00:31 +0000
@@ -22,7 +22,7 @@
22#include "dm_connection.h"22#include "dm_connection.h"
2323
24#include <mir/default_server_configuration.h>24#include <mir/default_server_configuration.h>
25#include <mir/shell/application_session.h>25#include <mir/shell/session.h>
2626
27class Configuration;27class Configuration;
2828
@@ -37,7 +37,7 @@
37 std::shared_ptr<mir::DefaultServerConfiguration> config;37 std::shared_ptr<mir::DefaultServerConfiguration> config;
38 boost::asio::io_service io_service;38 boost::asio::io_service io_service;
39 std::shared_ptr<DMConnection> dm_connection;39 std::shared_ptr<DMConnection> dm_connection;
40 std::shared_ptr<mir::shell::ApplicationSession> active_session;40 std::shared_ptr<mir::shell::Session> active_session;
4141
42 void set_active_session(std::string client_name);42 void set_active_session(std::string client_name);
43 void set_next_session(std::string client_name);43 void set_next_session(std::string client_name);

Subscribers

People subscribed via source and target branches