summaryrefslogtreecommitdiff
path: root/libs/androidfw/AssetsProvider.cpp
diff options
context:
space:
mode:
author Arthur Hung <arthurhung@google.com> 2022-09-15 07:05:20 +0000
committer Arthur Hung <arthurhung@google.com> 2022-09-15 07:05:20 +0000
commitef49b9f1cb989523aca0c2d27ed06c2e638fb1df (patch)
tree3b2b0f8d4dfc59bbc625fabe9107e86359b49907 /libs/androidfw/AssetsProvider.cpp
parent376a24534b2ea06fd8483d8b3b92e915943496a5 (diff)
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
Diffstat (limited to 'libs/androidfw/AssetsProvider.cpp')
0 files changed, 0 insertions, 0 deletions