Chromium Code Reviews| Index: ui/ozone/platform/dri/dri_cursor.cc |
| diff --git a/ui/ozone/platform/dri/dri_cursor.cc b/ui/ozone/platform/dri/dri_cursor.cc |
| index 22d21726136cf157c911b694c3904ff3dc38e195..fb8581190676b25ca9b4630dcc4126a1c5a8ef67 100644 |
| --- a/ui/ozone/platform/dri/dri_cursor.cc |
| +++ b/ui/ozone/platform/dri/dri_cursor.cc |
| @@ -58,16 +58,20 @@ void DriCursor::MoveCursorTo(gfx::AcceleratedWidget widget, |
| cursor_window_ = widget; |
| cursor_location_ = location; |
| + cursor_root_location_ = location; |
| if (cursor_window_ == gfx::kNullAcceleratedWidget) |
| return; |
| DriWindow* window = window_manager_->GetWindow(cursor_window_); |
| - const gfx::Size& size = window->GetBounds().size(); |
| + gfx::Rect bounds = window->GetBounds(); |
| + const gfx::Size& size = bounds.size(); |
| cursor_location_.SetToMax(gfx::PointF(0, 0)); |
| // Right and bottom edges are exclusive. |
| cursor_location_.SetToMin(gfx::PointF(size.width() - 1, size.height() - 1)); |
| + cursor_root_location_.Offset(bounds.origin().x(), bounds.origin().y()); |
|
spang
2014/11/10 20:30:47
I noticed a bug. This is using the original locati
llandwerlin-old
2014/11/11 11:03:53
Done.
|
| + |
| if (cursor_.get()) |
| hardware_->MoveHardwareCursor(cursor_window_, bitmap_location()); |
| } |
| @@ -88,6 +92,10 @@ gfx::PointF DriCursor::location() { |
| return cursor_location_; |
| } |
| +gfx::PointF DriCursor::root_location() { |
| + return cursor_root_location_; |
| +} |
| + |
| gfx::Point DriCursor::bitmap_location() { |
| return gfx::ToFlooredPoint(cursor_location_) - |
| cursor_->hotspot().OffsetFromOrigin(); |