| Index: ui/events/platform/x11/x11_event_source.cc
|
| diff --git a/ui/events/platform/x11/x11_event_source.cc b/ui/events/platform/x11/x11_event_source.cc
|
| index 9268c425ca5ec6afc2fbbce33a4bd99c76ac33af..424b4be67a926ad58bd8bc716eeaf1a38ee9d5ca 100644
|
| --- a/ui/events/platform/x11/x11_event_source.cc
|
| +++ b/ui/events/platform/x11/x11_event_source.cc
|
| @@ -86,13 +86,8 @@ X11EventSource::X11EventSource(XDisplay* display)
|
| continue_stream_(true) {
|
| CHECK(display_);
|
| DeviceDataManagerX11::CreateInstance();
|
| - hotplug_event_handler_.reset(
|
| - new X11HotplugEventHandler(DeviceDataManager::GetInstance()));
|
| InitializeXInput2(display_);
|
| InitializeXkb(display_);
|
| -
|
| - // Force the initial device query to have an update list of active devices.
|
| - hotplug_event_handler_->OnHotplugEvent();
|
| }
|
|
|
| X11EventSource::~X11EventSource() {
|
| @@ -155,4 +150,12 @@ void X11EventSource::StopCurrentEventStream() {
|
| continue_stream_ = false;
|
| }
|
|
|
| +void X11EventSource::OnDispatcherListChanged() {
|
| + if (!hotplug_event_handler_) {
|
| + hotplug_event_handler_.reset(new X11HotplugEventHandler());
|
| + // Force the initial device query to have an update list of active devices.
|
| + hotplug_event_handler_->OnHotplugEvent();
|
| + }
|
| +}
|
| +
|
| } // namespace ui
|
|
|