Mir

Merge lp:~andreas-pokorny/mir/disable-android-input-stack-when-platform-available into lp:mir

Proposed by Andreas Pokorny on 2015-08-05
Status: Merged
Approved by: Cemil Azizoglu on 2015-08-06
Approved revision: 2813
Merged at revision: 2822
Proposed branch: lp:~andreas-pokorny/mir/disable-android-input-stack-when-platform-available
Merge into: lp:mir
Diff against target: 43 lines (+9/-21)
1 file modified
src/server/input/default_configuration.cpp (+9/-21)
To merge this branch: bzr merge lp:~andreas-pokorny/mir/disable-android-input-stack-when-platform-available
Reviewer Review Type Date Requested Status
Cemil Azizoglu (community) Approve on 2015-08-06
Alberto Aguirre Approve on 2015-08-06
Kevin DuBois (community) Approve on 2015-08-05
PS Jenkins bot continuous-integration Approve on 2015-08-05
Alan Griffiths 2015-08-05 Approve on 2015-08-05
Review via email: mp+267022@code.launchpad.net

Commit Message

remove the test for x11-input

Since stub input is now only set during tests that need to use fake input devices the check for the server platform name is no longer necessary. As soon as an input platform is configured the android input stack is disabled.

Still this is not the final solution - Instead we should probe for available platforms and also allow loading multiple platforms

Description of the Change

Since we just remove stub-input from the wrapper, and hence only see the input-stub library during test execution, there is currently no need to check for the input platform name inside DefaultServerConfiguration.

Hence from now on we disable the android input stack as soon as there is an input platform available.

To post a comment you must log in.
Alan Griffiths (alan-griffiths) wrote :

Looks good. I'm not sure I'm up-to-date with the way Mir-on-X input works today, so I'd like Cemil to approve too.

review: Approve
Kevin DuBois (kdub) wrote :

lgtm

review: Approve
Alberto Aguirre (albaguirre) wrote :

Ok.

review: Approve
Cemil Azizoglu (cemil-azizoglu) wrote :

It works with mir-on-x.

So the assumption is no input platform will require Android input stack. I guess because input platforms are a replacement for it.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/server/input/default_configuration.cpp'
2--- src/server/input/default_configuration.cpp 2015-07-23 02:39:20 +0000
3+++ src/server/input/default_configuration.cpp 2015-08-05 13:02:46 +0000
4@@ -378,30 +378,18 @@
5
6 std::shared_ptr<mi::InputManager> ret;
7
8- if (options->is_set(options::platform_input_lib))
9- {
10- auto lib = std::make_shared<mir::SharedLibrary>(
11- options->get<std::string>(options::platform_input_lib));
12-
13- auto describe = lib->load_function<mi::DescribeModule>(
14- "describe_input_module",
15- MIR_SERVER_INPUT_PLATFORM_VERSION);
16-
17- auto props = describe();
18- ret = std::make_shared<mi::DefaultInputManager>(
19- the_input_reading_multiplexer(),
20- strcmp(props->name, "x11-input") ? the_legacy_input_dispatchable() :
21- std::make_shared<NullLegacyInputDispatchable>());
22- }
23- else
24- {
25- ret = std::make_shared<mi::DefaultInputManager>(
26- the_input_reading_multiplexer(), the_legacy_input_dispatchable());
27- }
28-
29 auto platform = the_input_platform();
30 if (platform)
31+ {
32+ ret = std::make_shared<mi::DefaultInputManager>(the_input_reading_multiplexer(),
33+ std::make_shared<NullLegacyInputDispatchable>());
34 ret->add_platform(platform);
35+ }
36+ else
37+ {
38+ ret = std::make_shared<mi::DefaultInputManager>(
39+ the_input_reading_multiplexer(), the_legacy_input_dispatchable());
40+ }
41 return ret;
42 }
43 else

Subscribers

People subscribed via source and target branches