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 e6429493f26db6a9a4c9cfc65fd0404a465b738f..ba55e0b1751a92eec498934a293125f6b87ded90 100644 |
--- a/ui/events/platform/x11/x11_event_source.cc |
+++ b/ui/events/platform/x11/x11_event_source.cc |
@@ -135,10 +135,18 @@ uint32_t X11EventSource::ExtractCookieDataDispatchEvent(XEvent* xevent) { |
uint32_t X11EventSource::DispatchEvent(XEvent* xevent) { |
uint32_t action = PlatformEventSource::DispatchEvent(xevent); |
if (xevent->type == GenericEvent && |
- xevent->xgeneric.evtype == XI_HierarchyChanged) { |
+ (xevent->xgeneric.evtype == XI_HierarchyChanged || |
+ xevent->xgeneric.evtype == XI_DeviceChanged)) { |
ui::UpdateDeviceList(); |
hotplug_event_handler_->OnHotplugEvent(); |
} |
+ |
+ if (xevent->type == EnterNotify && |
+ xevent->xcrossing.detail != NotifyInferior && |
+ xevent->xcrossing.mode != NotifyUngrab) { |
+ // Clear stored scroll data |
+ ui::DeviceDataManagerX11::GetInstance()->InvalidateScrollClasses(); |
+ } |
return action; |
} |