OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/aura/root_window.h" | 5 #include "ui/aura/root_window.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
303 | 303 |
304 if (!target) { | 304 if (!target) { |
305 target = static_cast<Window*>( | 305 target = static_cast<Window*>( |
306 gesture_recognizer_->GetTargetForLocation(event->GetLocation())); | 306 gesture_recognizer_->GetTargetForLocation(event->GetLocation())); |
307 } | 307 } |
308 | 308 |
309 if (!target && !bounds().Contains(event->location())) { | 309 if (!target && !bounds().Contains(event->location())) { |
310 // If the touch is outside the root window, set its target to the | 310 // If the touch is outside the root window, set its target to the |
311 // root window. | 311 // root window. |
312 target = this; | 312 target = this; |
313 } else { | 313 } else if (target != this) { |
sky
2012/05/04 16:31:41
Can you add a test case for this?
Mr4D (OOO till 08-26)
2012/05/07 16:28:21
After discussion with Sadrul I changed this to the
| |
314 // We only come here when the first contact was within the root window. | |
314 if (!target) | 315 if (!target) |
315 target = GetEventHandlerForPoint(event->location()); | 316 target = GetEventHandlerForPoint(event->location()); |
316 if (!target) | 317 if (!target) |
317 return false; | 318 return false; |
318 | 319 |
319 TouchEvent translated_event(*event, this, target); | 320 TouchEvent translated_event(*event, this, target); |
320 status = ProcessTouchEvent(target, &translated_event); | 321 status = ProcessTouchEvent(target, &translated_event); |
321 handled = status != ui::TOUCH_STATUS_UNKNOWN; | 322 handled = status != ui::TOUCH_STATUS_UNKNOWN; |
322 | 323 |
323 if (status == ui::TOUCH_STATUS_QUEUED || | 324 if (status == ui::TOUCH_STATUS_QUEUED || |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
986 void RootWindow::UnlockCompositor() { | 987 void RootWindow::UnlockCompositor() { |
987 DCHECK(compositor_lock_); | 988 DCHECK(compositor_lock_); |
988 compositor_lock_ = NULL; | 989 compositor_lock_ = NULL; |
989 if (draw_on_compositor_unlock_) { | 990 if (draw_on_compositor_unlock_) { |
990 draw_on_compositor_unlock_ = false; | 991 draw_on_compositor_unlock_ = false; |
991 ScheduleDraw(); | 992 ScheduleDraw(); |
992 } | 993 } |
993 } | 994 } |
994 | 995 |
995 } // namespace aura | 996 } // namespace aura |
OLD | NEW |