| 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/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1029 case ui::ET_MOUSE_RELEASED: | 1029 case ui::ET_MOUSE_RELEASED: |
| 1030 mouse_pressed_handler_ = NULL; | 1030 mouse_pressed_handler_ = NULL; |
| 1031 mouse_button_flags_ = event->flags() & kMouseButtonFlagMask & | 1031 mouse_button_flags_ = event->flags() & kMouseButtonFlagMask & |
| 1032 ~event->changed_button_flags(); | 1032 ~event->changed_button_flags(); |
| 1033 Env::GetInstance()->set_mouse_button_flags(mouse_button_flags_); | 1033 Env::GetInstance()->set_mouse_button_flags(mouse_button_flags_); |
| 1034 break; | 1034 break; |
| 1035 default: | 1035 default: |
| 1036 break; | 1036 break; |
| 1037 } | 1037 } |
| 1038 if (target) { | 1038 if (target) { |
| 1039 int flags = event->flags(); | |
| 1040 gfx::Point location_in_window = event->location(); | |
| 1041 Window::ConvertPointToTarget(this, target, &location_in_window); | |
| 1042 if (IsNonClientLocation(target, location_in_window)) | |
| 1043 flags |= ui::EF_IS_NON_CLIENT; | |
| 1044 event->set_flags(flags); | |
| 1045 event->ConvertLocationToTarget(static_cast<Window*>(this), target); | 1039 event->ConvertLocationToTarget(static_cast<Window*>(this), target); |
| 1040 if (IsNonClientLocation(target, event->location())) |
| 1041 event->set_flags(event->flags() | ui::EF_IS_NON_CLIENT); |
| 1046 return ProcessMouseEvent(target, event); | 1042 return ProcessMouseEvent(target, event); |
| 1047 } | 1043 } |
| 1048 return false; | 1044 return false; |
| 1049 } | 1045 } |
| 1050 | 1046 |
| 1051 void RootWindow::DispatchHeldMouseMove() { | 1047 void RootWindow::DispatchHeldMouseMove() { |
| 1052 if (held_mouse_move_.get()) { | 1048 if (held_mouse_move_.get()) { |
| 1053 // If a mouse move has been synthesized, the target location is suspect, | 1049 // If a mouse move has been synthesized, the target location is suspect, |
| 1054 // so drop the held event. | 1050 // so drop the held event. |
| 1055 if (!synthesize_mouse_move_) | 1051 if (!synthesize_mouse_move_) |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1095 void RootWindow::UnlockCompositor() { | 1091 void RootWindow::UnlockCompositor() { |
| 1096 DCHECK(compositor_lock_); | 1092 DCHECK(compositor_lock_); |
| 1097 compositor_lock_ = NULL; | 1093 compositor_lock_ = NULL; |
| 1098 if (draw_on_compositor_unlock_) { | 1094 if (draw_on_compositor_unlock_) { |
| 1099 draw_on_compositor_unlock_ = false; | 1095 draw_on_compositor_unlock_ = false; |
| 1100 ScheduleDraw(); | 1096 ScheduleDraw(); |
| 1101 } | 1097 } |
| 1102 } | 1098 } |
| 1103 | 1099 |
| 1104 } // namespace aura | 1100 } // namespace aura |
| OLD | NEW |