| Index: ui/events/ozone/evdev/tablet_event_converter_evdev.cc
|
| diff --git a/ui/events/ozone/evdev/tablet_event_converter_evdev.cc b/ui/events/ozone/evdev/tablet_event_converter_evdev.cc
|
| index d2ca2e3af95d6b0b4c6744b164992357ee784f6d..40bac2c017f213b45ee73e3d31d003c4308f1091 100644
|
| --- a/ui/events/ozone/evdev/tablet_event_converter_evdev.cc
|
| +++ b/ui/events/ozone/evdev/tablet_event_converter_evdev.cc
|
| @@ -106,10 +106,15 @@ void TabletEventConverterEvdev::ConvertAbsEvent(const input_event& input) {
|
| }
|
|
|
| void TabletEventConverterEvdev::UpdateCursor() {
|
| - int width = cursor_->GetCursorDisplayBounds().width();
|
| - int height = cursor_->GetCursorDisplayBounds().height();
|
| - int x = ((x_abs_location_ - x_abs_min_) * width) / x_abs_range_;
|
| - int y = ((y_abs_location_ - y_abs_min_) * height) / y_abs_range_;
|
| + gfx::Rect display_bounds = cursor_->GetCursorDisplayBounds();
|
| +
|
| + int x =
|
| + ((x_abs_location_ - x_abs_min_) * display_bounds.width()) / x_abs_range_;
|
| + int y =
|
| + ((y_abs_location_ - y_abs_min_) * display_bounds.height()) / y_abs_range_;
|
| +
|
| + x += display_bounds.x();
|
| + y += display_bounds.y();
|
|
|
| cursor_->MoveCursorTo(gfx::PointF(x, y));
|
| }
|
|
|