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

Unified Diff: ui/aura/window_event_dispatcher.cc

Issue 1559163002: Clean up event flags a bit: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comment Created 4 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
« no previous file with comments | « ui/aura/remote_window_tree_host_win.cc ('k') | ui/base/accelerators/accelerator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_event_dispatcher.cc
diff --git a/ui/aura/window_event_dispatcher.cc b/ui/aura/window_event_dispatcher.cc
index 92b3b9f10092d2d998afd1fefd028f4d8ded4d84..5f9204847b5cbaebe69172f7e4c83b1c1c7a2977 100644
--- a/ui/aura/window_event_dispatcher.cc
+++ b/ui/aura/window_event_dispatcher.cc
@@ -791,11 +791,6 @@ DispatchDetails WindowEventDispatcher::PreDispatchMouseEvent(
}
}
- const int kMouseButtonFlagMask = ui::EF_LEFT_MOUSE_BUTTON |
- ui::EF_MIDDLE_MOUSE_BUTTON |
- ui::EF_RIGHT_MOUSE_BUTTON |
- ui::EF_BACK_MOUSE_BUTTON |
- ui::EF_FORWARD_MOUSE_BUTTON;
switch (event->type()) {
case ui::ET_MOUSE_EXITED:
if (!target || target == window()) {
@@ -856,13 +851,12 @@ DispatchDetails WindowEventDispatcher::PreDispatchMouseEvent(
// sent to the wrong target.
if (!(event->flags() & ui::EF_IS_NON_CLIENT) && !mouse_pressed_handler_)
mouse_pressed_handler_ = target;
- Env::GetInstance()->set_mouse_button_flags(
- event->flags() & kMouseButtonFlagMask);
+ Env::GetInstance()->set_mouse_button_flags(event->button_flags());
break;
case ui::ET_MOUSE_RELEASED:
mouse_pressed_handler_ = NULL;
- Env::GetInstance()->set_mouse_button_flags(event->flags() &
- kMouseButtonFlagMask & ~event->changed_button_flags());
+ Env::GetInstance()->set_mouse_button_flags(
+ event->button_flags() & ~event->changed_button_flags());
break;
default:
break;
« no previous file with comments | « ui/aura/remote_window_tree_host_win.cc ('k') | ui/base/accelerators/accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698