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

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

Issue 688253002: Implemented smooth scrolling using xinput2 in X11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Applied @msw's comments - renamed amount to remainder Created 4 years, 11 months 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
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;
}

Powered by Google App Engine
This is Rietveld 408576698