diff options
-rw-r--r-- | src/plugins/platforms/wasm/qwasmcompositor.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/platforms/wasm/qwasmcompositor.cpp b/src/plugins/platforms/wasm/qwasmcompositor.cpp index 92e3150738..fc3cbcaa8f 100644 --- a/src/plugins/platforms/wasm/qwasmcompositor.cpp +++ b/src/plugins/platforms/wasm/qwasmcompositor.cpp @@ -172,11 +172,16 @@ void QWasmCompositor::deliverUpdateRequests() void QWasmCompositor::deliverUpdateRequest(QWasmWindow *window, UpdateRequestDeliveryType updateType) { + QWindow *qwindow = window->window(); + + // Make sure the DPR value for the window is up to date on expose/repaint. + // FIXME: listen to native DPR change events instead, if/when available. + QWindowSystemInterface::handleWindowDevicePixelRatioChanged(qwindow); + // Update by deliverUpdateRequest and expose event according to requested update // type. If the window has not yet been exposed then we must expose it first regardless // of update type. The deliverUpdateRequest must still be sent in this case in order // to maintain correct window update state. - QWindow *qwindow = window->window(); QRect updateRect(QPoint(0, 0), qwindow->geometry().size()); if (updateType == UpdateRequestDelivery) { if (qwindow->isExposed() == false) |