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

Unified Diff: ui/aura/root_window_host_linux.cc

Issue 8892005: aura-x11: Make sure the list of devices to track are updated when device hierarchy changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window_host_linux.cc
diff --git a/ui/aura/root_window_host_linux.cc b/ui/aura/root_window_host_linux.cc
index a2c4a731a11e4153a0c838c901de236f53c38814..d577acd9425f00e116ef29e2a2fc8c01a9b810c0 100644
--- a/ui/aura/root_window_host_linux.cc
+++ b/ui/aura/root_window_host_linux.cc
@@ -344,10 +344,8 @@ RootWindowHostLinux::RootWindowHostLinux(const gfx::Rect& bounds)
XFlush(xdisplay_);
// TODO(sad): Re-enable once crbug.com/106516 is fixed.
-#if 0
if (base::MessagePumpForUI::HasXInput2())
ui::TouchFactory::GetInstance()->SetupXI2ForXWindow(xwindow_);
-#endif
base::MessagePumpX::SetDefaultDispatcher(this);
MessageLoopForUI::current()->AddDestructionObserver(this);
@@ -422,6 +420,13 @@ base::MessagePumpDispatcher::DispatchStatus RootWindowHostLinux::Dispatch(
if (!factory->ShouldProcessXI2Event(xev))
break;
+ // Update the device list if necessary.
+ if (xev->xgeneric.evtype == XI_HierarchyChanged) {
+ factory->UpdateDeviceList(xdisplay_);
+ handled = true;
+ break;
+ }
+
// If this is a motion event we want to coalesce all pending motion
// events that are at the top of the queue.
XEvent last_event;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698