summaryrefslogtreecommitdiffstats
path: root/views/focus/accelerator_handler_touch.cc
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-20 16:58:11 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-20 16:58:11 +0000
commit086aa35fb71b1c7801f2b04c9bdd44f7a7ac03b1 (patch)
treeab9460554bfb71ce760fb26fa6b1af209a2d2894 /views/focus/accelerator_handler_touch.cc
parentf680c5c3ad1f804fd4b5ed694f565a94f05c8d22 (diff)
downloadchromium_src-086aa35fb71b1c7801f2b04c9bdd44f7a7ac03b1.zip
chromium_src-086aa35fb71b1c7801f2b04c9bdd44f7a7ac03b1.tar.gz
chromium_src-086aa35fb71b1c7801f2b04c9bdd44f7a7ac03b1.tar.bz2
Make sure the device list is kept up-to-date.
A device can be loaded at times after chrome has already started. So make sure the list of devices is kept up-to-date. BUG=none TEST=none Review URL: http://codereview.chromium.org/6877061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82316 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/focus/accelerator_handler_touch.cc')
-rw-r--r--views/focus/accelerator_handler_touch.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/views/focus/accelerator_handler_touch.cc b/views/focus/accelerator_handler_touch.cc
index 04dbec8..716cb29 100644
--- a/views/focus/accelerator_handler_touch.cc
+++ b/views/focus/accelerator_handler_touch.cc
@@ -156,7 +156,15 @@ bool DispatchXEvent(XEvent* xev) {
#if defined(HAVE_XINPUT2)
if (xev->type == GenericEvent) {
+ if (!TouchFactory::GetInstance()->ShouldProcessXI2Event(xev))
+ return true; // Consume the event.
+
XGenericEventCookie* cookie = &xev->xcookie;
+ if (cookie->evtype == XI_HierarchyChanged) {
+ TouchFactory::GetInstance()->UpdateDeviceList(cookie->display);
+ return true;
+ }
+
XIDeviceEvent* xiev = static_cast<XIDeviceEvent*>(cookie->data);
xwindow = xiev->event;
}