summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-12-03 09:21:43 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-05-05 22:01:36 +0200
commit5290027e3bab75f14fc0a2b7c206594d9cb91e76 (patch)
tree02dca4b645613a68ebc7bff01df65021d251507d /src/gui/kernel/qguiapplication.cpp
parent0ef6b3d138d5d3e7199d65cb7c6b0042f9437884 (diff)
Emit QScreen::(availableG|g)eometryChanged() on logical DPI change
When a change in logical DPI occurs due to the user changing the scaling factor, the screen size in device independent pixels may change due to High DPI choosing a different scale factor. Factor out the commonly used code into QScreenPrivate methods and use them from QGuiApplicationPrivate::processScreenLogicalDotsPerInchChange(). Pick-to: 5.15 Task-number: QTBUG-76902 Task-number: QTBUG-79248 Change-Id: I241a0f52d8236a65084d501fb4d8f9faeea89c0f Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r--src/gui/kernel/qguiapplication.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 8e50cbc469..356f9fb11a 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -3131,14 +3131,7 @@ void QGuiApplicationPrivate::processScreenGeometryChange(QWindowSystemInterfaceP
updateFilteredScreenOrientation(s);
}
- if (availableGeometryChanged)
- emit s->availableGeometryChanged(s->availableGeometry());
-
- if (geometryChanged || availableGeometryChanged) {
- const auto siblings = s->virtualSiblings();
- for (QScreen* sibling : siblings)
- emit sibling->virtualGeometryChanged(sibling->virtualGeometry());
- }
+ s->d_func()->emitGeometryChangeSignals(geometryChanged, availableGeometryChanged);
resetCachedDevicePixelRatio();
}
@@ -3156,6 +3149,7 @@ void QGuiApplicationPrivate::processScreenLogicalDotsPerInchChange(QWindowSystem
s->d_func()->logicalDpi = QDpi(e->dpiX, e->dpiY);
emit s->logicalDotsPerInchChanged(s->logicalDotsPerInch());
+ s->d_func()->updateGeometriesWithSignals();
resetCachedDevicePixelRatio();
}