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 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
967 HandleMouseMoved(*event, target); | 967 HandleMouseMoved(*event, target); |
968 break; | 968 break; |
969 case ui::ET_MOUSE_PRESSED: | 969 case ui::ET_MOUSE_PRESSED: |
970 if (!mouse_pressed_handler_) | 970 if (!mouse_pressed_handler_) |
971 mouse_pressed_handler_ = target; | 971 mouse_pressed_handler_ = target; |
972 mouse_button_flags_ = event->flags() & kMouseButtonFlagMask; | 972 mouse_button_flags_ = event->flags() & kMouseButtonFlagMask; |
973 Env::GetInstance()->set_mouse_button_flags(mouse_button_flags_); | 973 Env::GetInstance()->set_mouse_button_flags(mouse_button_flags_); |
974 break; | 974 break; |
975 case ui::ET_MOUSE_RELEASED: | 975 case ui::ET_MOUSE_RELEASED: |
976 mouse_pressed_handler_ = NULL; | 976 mouse_pressed_handler_ = NULL; |
977 mouse_button_flags_ = event->flags() & kMouseButtonFlagMask; | 977 mouse_button_flags_ = event->flags() & kMouseButtonFlagMask & |
| 978 ~event->changed_button_flags(); |
978 Env::GetInstance()->set_mouse_button_flags(mouse_button_flags_); | 979 Env::GetInstance()->set_mouse_button_flags(mouse_button_flags_); |
979 break; | 980 break; |
980 default: | 981 default: |
981 break; | 982 break; |
982 } | 983 } |
983 if (target && target->delegate()) { | 984 if (target && target->delegate()) { |
984 int flags = event->flags(); | 985 int flags = event->flags(); |
985 gfx::Point location_in_window = event->location(); | 986 gfx::Point location_in_window = event->location(); |
986 Window::ConvertPointToTarget(this, target, &location_in_window); | 987 Window::ConvertPointToTarget(this, target, &location_in_window); |
987 if (IsNonClientLocation(target, location_in_window)) | 988 if (IsNonClientLocation(target, location_in_window)) |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1039 void RootWindow::UnlockCompositor() { | 1040 void RootWindow::UnlockCompositor() { |
1040 DCHECK(compositor_lock_); | 1041 DCHECK(compositor_lock_); |
1041 compositor_lock_ = NULL; | 1042 compositor_lock_ = NULL; |
1042 if (draw_on_compositor_unlock_) { | 1043 if (draw_on_compositor_unlock_) { |
1043 draw_on_compositor_unlock_ = false; | 1044 draw_on_compositor_unlock_ = false; |
1044 ScheduleDraw(); | 1045 ScheduleDraw(); |
1045 } | 1046 } |
1046 } | 1047 } |
1047 | 1048 |
1048 } // namespace aura | 1049 } // namespace aura |
OLD | NEW |