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

Unified Diff: components/mus/ws/platform_display.cc

Issue 1892883002: Dispatch scroll events as mouse wheel events in mus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/platform_display.cc
diff --git a/components/mus/ws/platform_display.cc b/components/mus/ws/platform_display.cc
index cc0b748a9845e5cfb885ddaffc031466c18f93e6..bfb51c1ff57d554731ed1459da2f6fed6adb286d 100644
--- a/components/mus/ws/platform_display.cc
+++ b/components/mus/ws/platform_display.cc
@@ -358,7 +358,11 @@ void DefaultPlatformDisplay::OnDamageRect(const gfx::Rect& damaged_region) {
}
void DefaultPlatformDisplay::DispatchEvent(ui::Event* event) {
- if (event->IsMouseEvent() && !event->IsMouseWheelEvent()) {
+ if (event->IsScrollEvent()) {
+ // TODO(moshayedi): crbug.com/602859. Dispatch scroll events as
+ // they are once we have proper support for scroll events.
+ delegate_->OnEvent(ui::MouseWheelEvent(*event->AsScrollEvent()));
+ } else if (event->IsMouseEvent() && !event->IsMouseWheelEvent()) {
delegate_->OnEvent(ui::PointerEvent(*event->AsMouseEvent()));
} else if (event->IsTouchEvent()) {
delegate_->OnEvent(ui::PointerEvent(*event->AsTouchEvent()));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698