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

Unified Diff: ash/display/mouse_cursor_event_filter.cc

Issue 11592011: events: Update mouse-event handlers to not return EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | « ash/display/mouse_cursor_event_filter.h ('k') | ash/drag_drop/drag_drop_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/mouse_cursor_event_filter.cc
diff --git a/ash/display/mouse_cursor_event_filter.cc b/ash/display/mouse_cursor_event_filter.cc
index 0e336d3a08cd2b9a79035781ca1d5e7fe14583e7..eb356ffa98ad84c9d127af69aba56da7113f4471 100644
--- a/ash/display/mouse_cursor_event_filter.cc
+++ b/ash/display/mouse_cursor_event_filter.cc
@@ -71,20 +71,20 @@ void MouseCursorEventFilter::HideSharedEdgeIndicator() {
shared_display_edge_indicator_->Hide();
}
-ui::EventResult MouseCursorEventFilter::OnMouseEvent(ui::MouseEvent* event) {
+void MouseCursorEventFilter::OnMouseEvent(ui::MouseEvent* event) {
// Handle both MOVED and DRAGGED events here because when the mouse pointer
// enters the other root window while dragging, the underlying window system
// (at least X11) stops generating a ui::ET_MOUSE_MOVED event.
if (event->type() != ui::ET_MOUSE_MOVED &&
event->type() != ui::ET_MOUSE_DRAGGED) {
- return ui::ER_UNHANDLED;
+ return;
}
gfx::Point point_in_screen(event->location());
aura::Window* target = static_cast<aura::Window*>(event->target());
wm::ConvertPointToScreen(target, &point_in_screen);
- return WarpMouseCursorIfNecessary(target->GetRootWindow(), point_in_screen) ?
- ui::ER_CONSUMED : ui::ER_UNHANDLED;
+ if (WarpMouseCursorIfNecessary(target->GetRootWindow(), point_in_screen))
+ event->StopPropagation();
}
bool MouseCursorEventFilter::WarpMouseCursorIfNecessary(
« no previous file with comments | « ash/display/mouse_cursor_event_filter.h ('k') | ash/drag_drop/drag_drop_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698