Commit d4283a36 authored by Tom Anderson's avatar Tom Anderson Committed by Commit Bot

[XProto] Fix regression in scroll handling

This fixes a regression after [1] in which I erroneously changed != to
== in 2 places.  This was causing a bug in setups that have
high-resolution scrolling where the scroll distance would not get
reset when switching to another app, scrolling, then switching back to
Chrome.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/2316436

R=nickdiego

Bug: 1113903
Change-Id: I4a0adce22687ccc4a79986bf5d4d5bd8f71c66dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2346952
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Commit-Queue: Nick Yamane <nickdiego@igalia.com>
Auto-Submit: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: default avatarNick Yamane <nickdiego@igalia.com>
Cr-Commit-Position: refs/heads/master@{#796533}
parent 0225537b
......@@ -417,8 +417,8 @@ void X11EventSource::PostDispatchEvent(x11::Event* x11_event) {
auto* crossing = x11_event->As<x11::CrossingEvent>();
if (crossing && crossing->opcode == x11::CrossingEvent::EnterNotify &&
crossing->detail == x11::NotifyDetail::Inferior &&
crossing->mode == x11::NotifyMode::Ungrab) {
crossing->detail != x11::NotifyDetail::Inferior &&
crossing->mode != x11::NotifyMode::Ungrab) {
// Clear stored scroll data
ui::DeviceDataManagerX11::GetInstance()->InvalidateScrollClasses(
DeviceDataManagerX11::kAllDevices);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment