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 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
980 break; | 980 break; |
981 case ui::ET_MOUSE_RELEASED: | 981 case ui::ET_MOUSE_RELEASED: |
982 mouse_pressed_handler_ = NULL; | 982 mouse_pressed_handler_ = NULL; |
983 mouse_button_flags_ = event->flags() & kMouseButtonFlagMask & | 983 mouse_button_flags_ = event->flags() & kMouseButtonFlagMask & |
984 ~event->changed_button_flags(); | 984 ~event->changed_button_flags(); |
985 Env::GetInstance()->set_mouse_button_flags(mouse_button_flags_); | 985 Env::GetInstance()->set_mouse_button_flags(mouse_button_flags_); |
986 break; | 986 break; |
987 default: | 987 default: |
988 break; | 988 break; |
989 } | 989 } |
990 if (target && target->delegate()) { | 990 if (target) { |
991 int flags = event->flags(); | 991 int flags = event->flags(); |
992 gfx::Point location_in_window = event->location(); | 992 gfx::Point location_in_window = event->location(); |
993 Window::ConvertPointToTarget(this, target, &location_in_window); | 993 Window::ConvertPointToTarget(this, target, &location_in_window); |
994 if (IsNonClientLocation(target, location_in_window)) | 994 if (IsNonClientLocation(target, location_in_window)) |
995 flags |= ui::EF_IS_NON_CLIENT; | 995 flags |= ui::EF_IS_NON_CLIENT; |
996 ui::MouseEvent translated_event( | 996 ui::MouseEvent translated_event( |
997 *event, static_cast<Window*>(this), target, event->type(), flags); | 997 *event, static_cast<Window*>(this), target, event->type(), flags); |
998 return ProcessMouseEvent(target, &translated_event); | 998 return ProcessMouseEvent(target, &translated_event); |
999 } | 999 } |
1000 return false; | 1000 return false; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1046 void RootWindow::UnlockCompositor() { | 1046 void RootWindow::UnlockCompositor() { |
1047 DCHECK(compositor_lock_); | 1047 DCHECK(compositor_lock_); |
1048 compositor_lock_ = NULL; | 1048 compositor_lock_ = NULL; |
1049 if (draw_on_compositor_unlock_) { | 1049 if (draw_on_compositor_unlock_) { |
1050 draw_on_compositor_unlock_ = false; | 1050 draw_on_compositor_unlock_ = false; |
1051 ScheduleDraw(); | 1051 ScheduleDraw(); |
1052 } | 1052 } |
1053 } | 1053 } |
1054 | 1054 |
1055 } // namespace aura | 1055 } // namespace aura |
OLD | NEW |