Don't update DPR on de-expose events
There is no need to run the catch-all DPR update if the window is not visible. Fixes: QTBUG-117762 Change-Id: Ib4e235fed4b21e5aa2ecafa960ab0900e2b68295 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 299dfef52c0cc12de223798c5a100350c0622acb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
567bd61dbc
commit
91b6436de8
@ -3271,10 +3271,12 @@ void QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::E
|
|||||||
// We expect that the platform plugins send DevicePixelRatioChange events.
|
// We expect that the platform plugins send DevicePixelRatioChange events.
|
||||||
// As a fail-safe make a final check here to make sure the cached DPR value is
|
// As a fail-safe make a final check here to make sure the cached DPR value is
|
||||||
// always up to date before sending the expose event.
|
// always up to date before sending the expose event.
|
||||||
|
if (e->isExposed && !e->region.isEmpty()) {
|
||||||
const bool dprWasChanged = QWindowPrivate::get(window)->updateDevicePixelRatio();
|
const bool dprWasChanged = QWindowPrivate::get(window)->updateDevicePixelRatio();
|
||||||
if (dprWasChanged)
|
if (dprWasChanged)
|
||||||
qWarning() << "The cached device pixel ratio value was stale on window expose. "
|
qWarning() << "The cached device pixel ratio value was stale on window expose. "
|
||||||
<< "Please file a QTBUG which explains how to reproduce.";
|
<< "Please file a QTBUG which explains how to reproduce.";
|
||||||
|
}
|
||||||
|
|
||||||
// We treat expose events for an already exposed window as paint events
|
// We treat expose events for an already exposed window as paint events
|
||||||
if (wasExposed && p->exposed && shouldSynthesizePaintEvents) {
|
if (wasExposed && p->exposed && shouldSynthesizePaintEvents) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user