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

Unified Diff: ash/wm/toplevel_window_event_handler.cc

Issue 144193002: Only drag or maximize / restore when event has not yet been handled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Always ignore handled events. Created 6 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: ash/wm/toplevel_window_event_handler.cc
diff --git a/ash/wm/toplevel_window_event_handler.cc b/ash/wm/toplevel_window_event_handler.cc
index 635860f356cf633efd1c0d37e74e688f5af6313b..a9eae4ac27c16598856fcf4d792e494b622f50ce 100644
--- a/ash/wm/toplevel_window_event_handler.cc
+++ b/ash/wm/toplevel_window_event_handler.cc
@@ -139,6 +139,8 @@ void ToplevelWindowEventHandler::OnKeyEvent(ui::KeyEvent* event) {
void ToplevelWindowEventHandler::OnMouseEvent(
ui::MouseEvent* event) {
+ if (event->handled())
+ return;
if ((event->flags() &
(ui::EF_MIDDLE_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON)) != 0)
return;
@@ -170,6 +172,8 @@ void ToplevelWindowEventHandler::OnMouseEvent(
}
void ToplevelWindowEventHandler::OnGestureEvent(ui::GestureEvent* event) {
+ if (event->handled())
+ return;
aura::Window* target = static_cast<aura::Window*>(event->target());
if (!target->delegate())
return;
@@ -384,7 +388,8 @@ void ToplevelWindowEventHandler::HandleMouseReleased(
// Completing the drag may result in hiding the window. If this happens
// return true so no other handlers/observers see the event. Otherwise
// they see the event on a hidden window.
- if (event->type() == ui::ET_MOUSE_CAPTURE_CHANGED &&
+ if (window_resizer_ &&
+ event->type() == ui::ET_MOUSE_CAPTURE_CHANGED &&
!target->IsVisible()) {
event->StopPropagation();
}

Powered by Google App Engine
This is Rietveld 408576698