QHighDPI: Fix wrong conversion for native child windows
Do not try to find a screen for native child coordinates. Fixes: QTBUG-78158 Change-Id: I78ba814929f4db3dfd7dd43c09f7c7642222f4fb Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
parent
90779d96ad
commit
a96c4b3aab
@ -476,8 +476,10 @@ QHighDpiScaling::ScaleAndOrigin QHighDpiScaling::scaleAndOrigin(const QWindow *w
|
||||
{
|
||||
if (!m_active)
|
||||
return { qreal(1), QPoint() };
|
||||
|
||||
QScreen *screen = window ? window->screen() : QGuiApplication::primaryScreen();
|
||||
return scaleAndOrigin(screen, nativePosition);
|
||||
const bool searchScreen = !window || window->isTopLevel();
|
||||
return scaleAndOrigin(screen, searchScreen ? nativePosition : nullptr);
|
||||
}
|
||||
|
||||
#endif //QT_NO_HIGHDPISCALING
|
||||
|
Loading…
Reference in New Issue
Block a user