By "off-primary-screen" here I mean windows which are visible on
more than one screen, e.g. a secondary screen in addition
to the primary screen.
In this case the call to QHighDpi::toNativeGlobalPosition(pos, this)
problematic, since it uses the scale factor for the primary
screen, while pos might be on the secondary screen.
One way to fix this is to look up the correct scale factor
based on pos. Another way is to realize we don't have to
use scaling to get the native window position, and get
it from platformWindow geometry. This patch implements this
fix.
Fixes: QTBUG-106695
Change-Id: I03ffc261e199f65e54b06b964d067b6a9e0dd021
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>