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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 host_->MoveCursorTo(ui::ConvertPointToPixel(layer(), location_in_dip)); |
| 221 last_mouse_location_ = location_in_dip; |
221 } | 222 } |
222 | 223 |
223 bool RootWindow::ConfineCursorToWindow() { | 224 bool RootWindow::ConfineCursorToWindow() { |
224 // We would like to be able to confine the cursor to that window. However, | 225 // 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 | 226 // 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 | 227 // 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. | 228 // being used in fullscreen mode, so root_window bounds = window bounds. |
228 return host_->ConfineCursorToRootWindow(); | 229 return host_->ConfineCursorToRootWindow(); |
229 } | 230 } |
230 | 231 |
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1032 void RootWindow::UnlockCompositor() { | 1033 void RootWindow::UnlockCompositor() { |
1033 DCHECK(compositor_lock_); | 1034 DCHECK(compositor_lock_); |
1034 compositor_lock_ = NULL; | 1035 compositor_lock_ = NULL; |
1035 if (draw_on_compositor_unlock_) { | 1036 if (draw_on_compositor_unlock_) { |
1036 draw_on_compositor_unlock_ = false; | 1037 draw_on_compositor_unlock_ = false; |
1037 ScheduleDraw(); | 1038 ScheduleDraw(); |
1038 } | 1039 } |
1039 } | 1040 } |
1040 | 1041 |
1041 } // namespace aura | 1042 } // namespace aura |
OLD | NEW |