Mir

Merge lp:~robertcarr/mir/fix-1170524 into lp:~mir-team/mir/trunk

Proposed by Robert Carr
Status: Merged
Approved by: Robert Carr
Approved revision: 590
Merged at revision: 608
Proposed branch: lp:~robertcarr/mir/fix-1170524
Merge into: lp:~mir-team/mir/trunk
Diff against target: 35 lines (+7/-7)
2 files modified
include/server/mir/default_server_configuration.h (+1/-1)
src/server/default_server_configuration.cpp (+6/-6)
To merge this branch: bzr merge lp:~robertcarr/mir/fix-1170524
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Kevin DuBois (community) Approve
Review via email: mp+159743@code.launchpad.net

Commit message

Input configuration must be held by shared_ptr

Description of the change

To post a comment you must log in.
Revision history for this message
Kevin DuBois (kdub) wrote :

looks ok to me

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'include/server/mir/default_server_configuration.h'
2--- include/server/mir/default_server_configuration.h 2013-04-18 12:27:02 +0000
3+++ include/server/mir/default_server_configuration.h 2013-04-19 00:49:26 +0000
4@@ -195,7 +195,7 @@
5
6 CachedPtr<frontend::Communicator> communicator;
7 CachedPtr<frontend::Shell> session_manager;
8- CachedPtr<input::android::InputConfiguration> input_configuration;
9+ std::shared_ptr<input::android::InputConfiguration> input_configuration;
10 CachedPtr<input::InputManager> input_manager;
11 CachedPtr<shell::InputFocusSelector> input_focus_selector;
12 CachedPtr<graphics::Platform> graphics_platform;
13
14=== modified file 'src/server/default_server_configuration.cpp'
15--- src/server/default_server_configuration.cpp 2013-04-18 23:37:28 +0000
16+++ src/server/default_server_configuration.cpp 2013-04-19 00:49:26 +0000
17@@ -360,12 +360,12 @@
18 std::shared_ptr<mia::InputConfiguration>
19 mir::DefaultServerConfiguration::the_input_configuration()
20 {
21- return input_configuration(
22- [this]()
23- {
24- const std::shared_ptr<mi::CursorListener> null_cursor_listener{};
25- return std::make_shared<mia::DefaultInputConfiguration>(the_event_filters(), the_display(), null_cursor_listener);
26- });
27+ if (!input_configuration)
28+ {
29+ const std::shared_ptr<mi::CursorListener> null_cursor_listener{};
30+ input_configuration = std::make_shared<mia::DefaultInputConfiguration>(the_event_filters(), the_display(), null_cursor_listener);
31+ }
32+ return input_configuration;
33 }
34
35 std::shared_ptr<mi::InputManager>

Subscribers

People subscribed via source and target branches