diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-15 05:37:45 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-15 05:37:45 +0000 |
commit | e1549a0ad266ca2377fffb02a7f2017717ac3c94 (patch) | |
tree | 7f27e60477c833ce9dc5aae0f137463607719d95 /ui/aura | |
parent | 0027fde1bff9ad57c191c3bb3362a410e97e9883 (diff) | |
download | chromium_src-e1549a0ad266ca2377fffb02a7f2017717ac3c94.zip chromium_src-e1549a0ad266ca2377fffb02a7f2017717ac3c94.tar.gz chromium_src-e1549a0ad266ca2377fffb02a7f2017717ac3c94.tar.bz2 |
aura-x11: Make sure the list of devices to track are updated when device hierarchy changes, and turn XInput2 back on.
If a device gets initialized after chrome boots up, then it is necessary to
update the list of devices chrome accepts input-events from.
BUG=106516
TEST=manually
Review URL: http://codereview.chromium.org/8892005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114601 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura')
-rw-r--r-- | ui/aura/root_window_host_linux.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ui/aura/root_window_host_linux.cc b/ui/aura/root_window_host_linux.cc index a2c4a73..d577acd 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; |