Skip to content
Commit ef49b9f1 authored by Arthur Hung's avatar Arthur Hung
Browse files

Fix translateToWindow to report proper values

The `translateToWindowX`and `translateToWindowY` will translate screen
pointer to window coordinate, if a window has a global scale, it should
multiply its `mInvGlobalScale` so we could get the proper values.

For example:
Global scale = 2.0f, inverse scale = 0.5f
Then screen pointer is (1000, 1000) and the window frame is (0, 0).
So after `translateToWindow`, it should return (500, 500) in window
coordinate.

Bug: b/246446831
Test: atest DragDropTest DragDropCompatTest
Change-Id: If66875ebefb1ae15779603c193136cf6334517d3
parent 376a2453
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment