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

Unified Diff: ui/views/widget/desktop_aura/x11_window_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 | « ui/views/widget/desktop_aura/x11_window_event_filter.h ('k') | ui/views/widget/native_widget_aura.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_aura/x11_window_event_filter.cc
diff --git a/ui/views/widget/desktop_aura/x11_window_event_filter.cc b/ui/views/widget/desktop_aura/x11_window_event_filter.cc
index 42269bd4b505e4109f2ea71f782f251244f84f38..b5c3cf2ec1bc62f598b364692eef995cf315293b 100644
--- a/ui/views/widget/desktop_aura/x11_window_event_filter.cc
+++ b/ui/views/widget/desktop_aura/x11_window_event_filter.cc
@@ -88,23 +88,23 @@ void X11WindowEventFilter::SetUseHostWindowBorders(bool use_os_border) {
sizeof(MotifWmHints)/sizeof(long));
}
-ui::EventResult X11WindowEventFilter::OnMouseEvent(ui::MouseEvent* event) {
+void X11WindowEventFilter::OnMouseEvent(ui::MouseEvent* event) {
if (event->type() != ui::ET_MOUSE_PRESSED)
- return ui::ER_UNHANDLED;
+ return;
if (!event->IsLeftMouseButton())
- return ui::ER_UNHANDLED;
+ return;
aura::Window* target = static_cast<aura::Window*>(event->target());
int component =
target->delegate()->GetNonClientComponent(event->location());
if (component == HTCLIENT)
- return ui::ER_UNHANDLED;
+ return;
// Get the |x_root_window_| location out of the native event.
gfx::Point root_location = event->system_location();
- return DispatchHostWindowDragMovement(component, root_location) ?
- ui::ER_CONSUMED : ui::ER_UNHANDLED;
+ if (DispatchHostWindowDragMovement(component, root_location))
+ event->StopPropagation();
}
bool X11WindowEventFilter::DispatchHostWindowDragMovement(
« no previous file with comments | « ui/views/widget/desktop_aura/x11_window_event_filter.h ('k') | ui/views/widget/native_widget_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698