~vanvugt/mir/testfix-1665802

« back to all changes in this revision

Viewing changes to src/server/input/default_configuration.cpp

Remove android-input

This now also removes the separate thread created for every client window. .

Approved by mir-ci-bot, Daniel van Vugt, Cemil Azizoglu, Brandon Schaefer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
#include "mir/default_server_configuration.h"
20
20
 
21
 
#include "android/input_sender.h"
22
21
#include "key_repeat_dispatcher.h"
23
22
#include "display_input_region.h"
24
23
#include "event_filter_chain_dispatcher.h"
25
 
#include "channel_factory.h"
26
24
#include "config_changer.h"
27
25
#include "cursor_controller.h"
28
26
#include "touchspot_controller.h"
30
28
#include "null_input_dispatcher.h"
31
29
#include "null_input_targeter.h"
32
30
#include "builtin_cursor_images.h"
33
 
#include "null_input_channel_factory.h"
34
31
#include "default_input_device_hub.h"
35
32
#include "default_input_manager.h"
36
33
#include "surface_input_dispatcher.h"
57
54
#include "mir_toolkit/cursors.h"
58
55
 
59
56
namespace mi = mir::input;
60
 
namespace mia = mi::android;
61
57
namespace mr = mir::report;
62
58
namespace ms = mir::scene;
63
59
namespace mg = mir::graphics;
130
126
        });
131
127
}
132
128
 
133
 
namespace
134
 
{
135
 
class NullInputSender : public mi::InputSender
136
 
{
137
 
public:
138
 
    virtual void send_event(MirEvent const&, std::shared_ptr<mi::InputChannel> const& ) {}
139
 
};
140
 
 
141
 
}
142
 
 
143
 
std::shared_ptr<mi::InputSender>
144
 
mir::DefaultServerConfiguration::the_input_sender()
145
 
{
146
 
    return input_sender(
147
 
        [this]() -> std::shared_ptr<mi::InputSender>
148
 
        {
149
 
        if (!the_options()->get<bool>(options::enable_input_opt))
150
 
            return std::make_shared<NullInputSender>();
151
 
        else
152
 
            return std::make_shared<mia::InputSender>(the_scene(), the_main_loop(), the_input_report());
153
 
        });
154
 
}
155
 
 
156
129
std::shared_ptr<msh::InputTargeter>
157
130
mir::DefaultServerConfiguration::the_input_targeter()
158
131
{
195
168
        });
196
169
}
197
170
 
198
 
std::shared_ptr<mi::InputChannelFactory> mir::DefaultServerConfiguration::the_input_channel_factory()
199
 
{
200
 
    auto const options = the_options();
201
 
    if (!options->get<bool>(options::enable_input_opt))
202
 
        return std::make_shared<mi::NullInputChannelFactory>();
203
 
    else
204
 
        return std::make_shared<mi::ChannelFactory>();
205
 
}
206
 
 
207
171
std::shared_ptr<mi::CursorListener>
208
172
mir::DefaultServerConfiguration::the_cursor_listener()
209
173
{