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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 2637403012: Suppress ET_MOUSE_MOVE when the mouse hasn't moved on Windows. (Closed)
Patch Set: Fix test Created 3 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: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 5e0d3028d7f540e1da6f549a0eff20597d97d4df..ce9a5076731da26379ef2d317d9e148f6a0a7f5d 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1596,6 +1596,15 @@ void RenderWidgetHostViewAura::OnKeyEvent(ui::KeyEvent* event) {
}
void RenderWidgetHostViewAura::OnMouseEvent(ui::MouseEvent* event) {
+#if defined(OS_WIN)
+ if (event->type() == ui::ET_MOUSE_MOVED) {
+ if (event->location() == last_mouse_move_location_) {
+ event->SetHandled();
+ return;
+ }
+ last_mouse_move_location_ = event->location();
+ }
+#endif
event_handler_->OnMouseEvent(event);
}

Powered by Google App Engine
This is Rietveld 408576698