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 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1012 break; | 1012 break; |
1013 case ui::ET_MOUSE_RELEASED: | 1013 case ui::ET_MOUSE_RELEASED: |
1014 mouse_pressed_handler_ = NULL; | 1014 mouse_pressed_handler_ = NULL; |
1015 mouse_button_flags_ = event->flags() & kMouseButtonFlagMask & | 1015 mouse_button_flags_ = event->flags() & kMouseButtonFlagMask & |
1016 ~event->changed_button_flags(); | 1016 ~event->changed_button_flags(); |
1017 Env::GetInstance()->set_mouse_button_flags(mouse_button_flags_); | 1017 Env::GetInstance()->set_mouse_button_flags(mouse_button_flags_); |
1018 break; | 1018 break; |
1019 default: | 1019 default: |
1020 break; | 1020 break; |
1021 } | 1021 } |
1022 if (target && target->delegate()) { | 1022 if (target) { |
1023 int flags = event->flags(); | 1023 int flags = event->flags(); |
1024 gfx::Point location_in_window = event->location(); | 1024 gfx::Point location_in_window = event->location(); |
1025 Window::ConvertPointToTarget(this, target, &location_in_window); | 1025 Window::ConvertPointToTarget(this, target, &location_in_window); |
1026 if (IsNonClientLocation(target, location_in_window)) | 1026 if (IsNonClientLocation(target, location_in_window)) |
1027 flags |= ui::EF_IS_NON_CLIENT; | 1027 flags |= ui::EF_IS_NON_CLIENT; |
1028 if (event->type() == ui::ET_MOUSEWHEEL) { | 1028 if (event->type() == ui::ET_MOUSEWHEEL) { |
1029 ui::MouseWheelEvent translated_event( | 1029 ui::MouseWheelEvent translated_event( |
1030 *static_cast<ui::MouseWheelEvent*>(event), | 1030 *static_cast<ui::MouseWheelEvent*>(event), |
1031 static_cast<Window*>(this), target, event->type(), flags); | 1031 static_cast<Window*>(this), target, event->type(), flags); |
1032 return ProcessMouseEvent(target, &translated_event); | 1032 return ProcessMouseEvent(target, &translated_event); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1086 void RootWindow::UnlockCompositor() { | 1086 void RootWindow::UnlockCompositor() { |
1087 DCHECK(compositor_lock_); | 1087 DCHECK(compositor_lock_); |
1088 compositor_lock_ = NULL; | 1088 compositor_lock_ = NULL; |
1089 if (draw_on_compositor_unlock_) { | 1089 if (draw_on_compositor_unlock_) { |
1090 draw_on_compositor_unlock_ = false; | 1090 draw_on_compositor_unlock_ = false; |
1091 ScheduleDraw(); | 1091 ScheduleDraw(); |
1092 } | 1092 } |
1093 } | 1093 } |
1094 | 1094 |
1095 } // namespace aura | 1095 } // namespace aura |
OLD | NEW |