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

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: Panels too, no test for these yet. 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 635860f356cf633efd1c0d37e74e688f5af6313b..4e8fe39fc9ff38d4a469ae34dbc4f7217dd5bb65 100644
--- a/ash/wm/toplevel_window_event_handler.cc
+++ b/ash/wm/toplevel_window_event_handler.cc
@@ -184,6 +184,8 @@ void ToplevelWindowEventHandler::OnGestureEvent(ui::GestureEvent* event) {
switch (event->type()) {
case ui::ET_GESTURE_TAP_DOWN: {
+ if (event->handled())
+ return;
int component =
target->delegate()->GetNonClientComponent(event->location());
if (!(WindowResizer::GetBoundsChangeForWindowComponent(component) &
@@ -203,7 +205,7 @@ void ToplevelWindowEventHandler::OnGestureEvent(ui::GestureEvent* event) {
return;
}
case ui::ET_GESTURE_SCROLL_BEGIN: {
- if (in_gesture_drag_)
+ if (in_gesture_drag_ || event->handled())
return;
int component =
target->delegate()->GetNonClientComponent(event->location());
@@ -352,7 +354,7 @@ void ToplevelWindowEventHandler::CompleteDrag(DragCompletionStatus status) {
void ToplevelWindowEventHandler::HandleMousePressed(
aura::Window* target,
ui::MouseEvent* event) {
- if (event->phase() != ui::EP_PRETARGET)
+ if (event->phase() != ui::EP_PRETARGET || event->handled())
return;
// We also update the current window component here because for the
« 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