Commit c30a7ecc authored by Richard Moe Gustavsen's avatar Richard Moe Gustavsen Committed by The Qt Project
Browse files

iOS: fix bug when reporting the screen position of touch events


The way we reported screen position (and normalized position)
for touch events was just wrong. The old implementation did
not take into account that a view could be anything else than
a direct child of the window, which fails for many cases (e.g
when using QGLWidgets). Nor did it take into account the status
bar, which made it hard to push small buttons since the touch
would always be slightly offset.

This patch calculates the screen pos by converting the touch pos
to window pos, and then subtract the application frame (that
contains the size of the status bar).

Change-Id: Ib7f5f6dcea3a611e1ed75d57fb4a4718564752f0
Reviewed-by: default avatarTor Arne Vestbø <tor.arne.vestbo@digia.com>
parent 2b02d9b0
No related merge requests found
Showing with 8 additions and 8 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment