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
1=== modified file 'src/dm_connection.h'
2--- src/dm_connection.h 2013-07-09 19:18:59 +0000
3+++ src/dm_connection.h 2013-11-20 11:00:31 +0000
4@@ -28,13 +28,6 @@
5 virtual void set_next_session(std::string client_name) = 0;
6 };
7
8-class NullDMMessageHandler : public DMMessageHandler
9-{
10-public:
11- void set_active_session(std::string client_name) {};
12- void set_next_session(std::string client_name) {};
13-};
14-
15 enum class USCMessageID
16 {
17 ping = 0,
18
19=== modified file 'src/system_compositor.cpp'
20--- src/system_compositor.cpp 2013-11-05 23:36:07 +0000
21+++ src/system_compositor.cpp 2013-11-20 11:00:31 +0000
22@@ -22,10 +22,9 @@
23 #include <mir/run_mir.h>
24 #include <mir/abnormal_exit.h>
25 #include <mir/server_status_listener.h>
26-#include <mir/shell/application_session.h>
27 #include <mir/shell/session.h>
28 #include <mir/shell/session_container.h>
29-#include <mir/shell/focus_setter.h>
30+#include <mir/shell/focus_controller.h>
31 #include <mir/input/cursor_listener.h>
32
33 #include <cerrno>
34@@ -238,19 +237,17 @@
35 active_session.reset();
36 config->the_shell_session_container()->for_each([&](std::shared_ptr<msh::Session> const& s)
37 {
38- auto app_session(std::static_pointer_cast<msh::ApplicationSession>(s));
39-
40 if (s->name() == client_name)
41 {
42- app_session->set_lifecycle_state(mir_lifecycle_state_resumed);
43- active_session = app_session;
44+ s->set_lifecycle_state(mir_lifecycle_state_resumed);
45+ active_session = s;
46 }
47 else
48- app_session->set_lifecycle_state(mir_lifecycle_state_will_suspend);
49+ s->set_lifecycle_state(mir_lifecycle_state_will_suspend);
50 });
51
52 if (active_session)
53- config->the_shell_focus_setter()->set_focus_to(active_session);
54+ config->the_focus_controller()->set_focus_to(active_session);
55 else
56 std::cerr << "Unable to set active session, unknown client name " << client_name << std::endl;
57 }
58
59=== modified file 'src/system_compositor.h'
60--- src/system_compositor.h 2013-10-31 22:35:26 +0000
61+++ src/system_compositor.h 2013-11-20 11:00:31 +0000
62@@ -22,7 +22,7 @@
63 #include "dm_connection.h"
64
65 #include <mir/default_server_configuration.h>
66-#include <mir/shell/application_session.h>
67+#include <mir/shell/session.h>
68
69 class Configuration;
70
71@@ -37,7 +37,7 @@
72 std::shared_ptr<mir::DefaultServerConfiguration> config;
73 boost::asio::io_service io_service;
74 std::shared_ptr<DMConnection> dm_connection;
75- std::shared_ptr<mir::shell::ApplicationSession> active_session;
76+ std::shared_ptr<mir::shell::Session> active_session;
77
78 void set_active_session(std::string client_name);
79 void set_next_session(std::string client_name);

Subscribers

People subscribed via source and target branches