| 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 // so just pass everything along to the host. | 210 // so just pass everything along to the host. |
| 211 host_->SetCursor(cursor); | 211 host_->SetCursor(cursor); |
| 212 } | 212 } |
| 213 | 213 |
| 214 void RootWindow::ShowCursor(bool show) { | 214 void RootWindow::ShowCursor(bool show) { |
| 215 cursor_shown_ = show; | 215 cursor_shown_ = show; |
| 216 host_->ShowCursor(show); | 216 host_->ShowCursor(show); |
| 217 } | 217 } |
| 218 | 218 |
| 219 void RootWindow::MoveCursorTo(const gfx::Point& location_in_dip) { | 219 void RootWindow::MoveCursorTo(const gfx::Point& location_in_dip) { |
| 220 host_->MoveCursorTo(ui::ConvertPointToPixel(layer(), location_in_dip)); | 220 gfx::Point location = location_in_dip; |
| 221 layer()->transform().TransformPoint(location); |
| 222 host_->MoveCursorTo(ui::ConvertPointToPixel(layer(), location)); |
| 223 last_mouse_location_ = location_in_dip; |
| 221 } | 224 } |
| 222 | 225 |
| 223 bool RootWindow::ConfineCursorToWindow() { | 226 bool RootWindow::ConfineCursorToWindow() { |
| 224 // We would like to be able to confine the cursor to that window. However, | 227 // We would like to be able to confine the cursor to that window. However, |
| 225 // currently, we do not have such functionality in X. So we just confine | 228 // currently, we do not have such functionality in X. So we just confine |
| 226 // to the root window. This is ok because this option is currently only | 229 // to the root window. This is ok because this option is currently only |
| 227 // being used in fullscreen mode, so root_window bounds = window bounds. | 230 // being used in fullscreen mode, so root_window bounds = window bounds. |
| 228 return host_->ConfineCursorToRootWindow(); | 231 return host_->ConfineCursorToRootWindow(); |
| 229 } | 232 } |
| 230 | 233 |
| (...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1032 void RootWindow::UnlockCompositor() { | 1035 void RootWindow::UnlockCompositor() { |
| 1033 DCHECK(compositor_lock_); | 1036 DCHECK(compositor_lock_); |
| 1034 compositor_lock_ = NULL; | 1037 compositor_lock_ = NULL; |
| 1035 if (draw_on_compositor_unlock_) { | 1038 if (draw_on_compositor_unlock_) { |
| 1036 draw_on_compositor_unlock_ = false; | 1039 draw_on_compositor_unlock_ = false; |
| 1037 ScheduleDraw(); | 1040 ScheduleDraw(); |
| 1038 } | 1041 } |
| 1039 } | 1042 } |
| 1040 | 1043 |
| 1041 } // namespace aura | 1044 } // namespace aura |
| OLD | NEW |