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 ui::MouseEvent translated_event( | 1028 ui::MouseEvent translated_event( |
1029 *event, static_cast<Window*>(this), target, event->type(), flags); | 1029 *event, static_cast<Window*>(this), target, event->type(), flags); |
1030 return ProcessMouseEvent(target, &translated_event); | 1030 return ProcessMouseEvent(target, &translated_event); |
1031 } | 1031 } |
1032 return false; | 1032 return false; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1079 void RootWindow::UnlockCompositor() { | 1079 void RootWindow::UnlockCompositor() { |
1080 DCHECK(compositor_lock_); | 1080 DCHECK(compositor_lock_); |
1081 compositor_lock_ = NULL; | 1081 compositor_lock_ = NULL; |
1082 if (draw_on_compositor_unlock_) { | 1082 if (draw_on_compositor_unlock_) { |
1083 draw_on_compositor_unlock_ = false; | 1083 draw_on_compositor_unlock_ = false; |
1084 ScheduleDraw(); | 1084 ScheduleDraw(); |
1085 } | 1085 } |
1086 } | 1086 } |
1087 | 1087 |
1088 } // namespace aura | 1088 } // namespace aura |
OLD | NEW |