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

Unified Diff: ui/base/x/x11_util.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/base/x/x11_util.cc
diff --git a/ui/base/x/x11_util.cc b/ui/base/x/x11_util.cc
index cd79518717d348174460d009facc9a6a20740d40..0fd233333904ab6742310f1195518107aad25fb6 100644
--- a/ui/base/x/x11_util.cc
+++ b/ui/base/x/x11_util.cc
@@ -374,9 +374,7 @@ XcursorImage* SkBitmapToXcursorImage(const SkBitmap* cursor_image,
return image;
}
-
-int CoalescePendingMotionEvents(const XEvent* xev,
- XEvent* last_event) {
+int CoalescePendingMotionEvents(const XEvent* xev, XEvent* last_event) {
XIDeviceEvent* xievent = static_cast<XIDeviceEvent*>(xev->xcookie.data);
int num_coalesced = 0;
XDisplay* display = xev->xany.display;
@@ -405,7 +403,9 @@ int CoalescePendingMotionEvents(const XEvent* xev,
if (next_event.type == GenericEvent &&
next_event.xgeneric.evtype == event_type &&
!ui::DeviceDataManagerX11::GetInstance()->IsCMTGestureEvent(
- &next_event)) {
+ &next_event) &&
+ ui::DeviceDataManagerX11::GetInstance()->GetScrollClassEventDetail(
+ &next_event) == SCROLL_TYPE_NO_SCROLL) {
XIDeviceEvent* next_xievent =
static_cast<XIDeviceEvent*>(next_event.xcookie.data);
// Confirm that the motion event is targeted at the same window
@@ -414,8 +414,7 @@ int CoalescePendingMotionEvents(const XEvent* xev,
xievent->child == next_xievent->child &&
xievent->detail == next_xievent->detail &&
xievent->buttons.mask_len == next_xievent->buttons.mask_len &&
- (memcmp(xievent->buttons.mask,
- next_xievent->buttons.mask,
+ (memcmp(xievent->buttons.mask, next_xievent->buttons.mask,
xievent->buttons.mask_len) == 0) &&
xievent->mods.base == next_xievent->mods.base &&
xievent->mods.latched == next_xievent->mods.latched &&

Powered by Google App Engine
This is Rietveld 408576698