highdpi: Update high-DPI in QWSI::handleScreenLogicalDotsPerInchChange
Update m_active early during DPI change to make scaling calls made during the DPI change use the new value. The existing call to updateHighDpiScaling() in QGuiApplicationPrivate:: processScreenLogicalDotsPerInchChange() is supposed to take care of this, however that call is made after the geometry change event is crated (with incorrect geometry) Change-Id: Ia0f6006c90355ec69ef92b88a020089ab21e072d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 454068232eae457c8f62f94b70e17b0ef8b7a74a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
93ddf89037
commit
d7c17432fe
@ -814,6 +814,11 @@ void QWindowSystemInterface::handleScreenGeometryChange(QScreen *screen, const Q
|
||||
|
||||
void QWindowSystemInterface::handleScreenLogicalDotsPerInchChange(QScreen *screen, qreal dpiX, qreal dpiY)
|
||||
{
|
||||
// Keep QHighDpiScaling::m_active in sync with platform screen state, in
|
||||
// order to make scaling calls made during DPI change use the new state.
|
||||
// FIXME: Remove when QHighDpiScaling::m_active has been removed.
|
||||
QHighDpiScaling::updateHighDpiScaling();
|
||||
|
||||
const QDpi effectiveDpi = QPlatformScreen::overrideDpi(QDpi{dpiX, dpiY});
|
||||
handleWindowSystemEvent<QWindowSystemInterfacePrivate::ScreenLogicalDotsPerInchEvent>(screen,
|
||||
effectiveDpi.first, effectiveDpi.second);
|
||||
|
Loading…
x
Reference in New Issue
Block a user