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

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: Indentation 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
« no previous file with comments | « ash/wm/panels/panel_window_event_handler.cc ('k') | ash/wm/toplevel_window_event_handler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1be86bf2738b9c6590a273d482062745b02844a0..583385e39fc59f0ddd0665e17d68842bba1908a3 100644
--- a/ash/wm/toplevel_window_event_handler.cc
+++ b/ash/wm/toplevel_window_event_handler.cc
@@ -183,6 +183,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;
@@ -214,6 +216,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;
@@ -495,7 +499,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();
}
« no previous file with comments | « ash/wm/panels/panel_window_event_handler.cc ('k') | ash/wm/toplevel_window_event_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698