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 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1123 const MouseMovedHandlerSetReason reason = | 1123 const MouseMovedHandlerSetReason reason = |
1124 (event->flags() & ui::EF_IS_SYNTHESIZED) == 0 ? | 1124 (event->flags() & ui::EF_IS_SYNTHESIZED) == 0 ? |
1125 MOUSE_MOVED_HANDLER_SET_REASON_MOUSE_MOVED : | 1125 MOUSE_MOVED_HANDLER_SET_REASON_MOUSE_MOVED : |
1126 MOUSE_MOVED_HANDLER_SET_REASON_MOUSE_MOVED_SYNTHESIZED; | 1126 MOUSE_MOVED_HANDLER_SET_REASON_MOUSE_MOVED_SYNTHESIZED; |
1127 SetMouseMovedHandler(target, reason); | 1127 SetMouseMovedHandler(target, reason); |
1128 DispatchMouseEnterOrExit(*event, ui::ET_MOUSE_ENTERED); | 1128 DispatchMouseEnterOrExit(*event, ui::ET_MOUSE_ENTERED); |
1129 if (!destroyed_tracker.Contains(this)) | 1129 if (!destroyed_tracker.Contains(this)) |
1130 return false; | 1130 return false; |
1131 } else { | 1131 } else { |
1132 SetMouseMovedHandler(NULL, MOUSE_MOVED_HANDLER_SET_REASON_NULL); | 1132 SetMouseMovedHandler(NULL, MOUSE_MOVED_HANDLER_SET_REASON_NULL); |
| 1133 return false; |
1133 } | 1134 } |
1134 } | 1135 } |
1135 break; | 1136 break; |
1136 case ui::ET_MOUSE_PRESSED: | 1137 case ui::ET_MOUSE_PRESSED: |
1137 // Don't set the mouse pressed handler for non client mouse down events. | 1138 // Don't set the mouse pressed handler for non client mouse down events. |
1138 // These are only sent by Windows and are not always followed with non | 1139 // These are only sent by Windows and are not always followed with non |
1139 // client mouse up events which causes subsequent mouse events to be | 1140 // client mouse up events which causes subsequent mouse events to be |
1140 // sent to the wrong target. | 1141 // sent to the wrong target. |
1141 if (!(event->flags() & ui::EF_IS_NON_CLIENT) && !mouse_pressed_handler_) | 1142 if (!(event->flags() & ui::EF_IS_NON_CLIENT) && !mouse_pressed_handler_) |
1142 mouse_pressed_handler_ = target; | 1143 mouse_pressed_handler_ = target; |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1290 } | 1291 } |
1291 | 1292 |
1292 gfx::Transform RootWindow::GetInverseRootTransform() const { | 1293 gfx::Transform RootWindow::GetInverseRootTransform() const { |
1293 float scale = ui::GetDeviceScaleFactor(layer()); | 1294 float scale = ui::GetDeviceScaleFactor(layer()); |
1294 gfx::Transform transform; | 1295 gfx::Transform transform; |
1295 transform.Scale(1.0f / scale, 1.0f / scale); | 1296 transform.Scale(1.0f / scale, 1.0f / scale); |
1296 return transformer_->GetInverseTransform() * transform; | 1297 return transformer_->GetInverseTransform() * transform; |
1297 } | 1298 } |
1298 | 1299 |
1299 } // namespace aura | 1300 } // namespace aura |
OLD | NEW |