Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Unified Diff: ui/events/platform/x11/x11_event_source.cc

Issue 688163004: Move X11 device processing to worker threads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix-blocking-touchscreen
Patch Set: Add null Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/platform/x11/x11_event_source.h ('k') | ui/events/platform/x11/x11_hotplug_event_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ui/events/platform/x11/x11_event_source.h ('k') | ui/events/platform/x11/x11_hotplug_event_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698