diff options
| author | Even Oscar Andersen <even.oscar.andersen@qt.io> | 2024-06-06 14:57:14 +0200 |
|---|---|---|
| committer | Even Oscar Andersen <even.oscar.andersen@qt.io> | 2024-06-13 19:33:21 +0200 |
| commit | 1b220e1db85dd332fe8c1eb8efd97dd302f9cee4 (patch) | |
| tree | e575ac93155ed5810d7bd0f0f4be34c7e04896ef /src/plugins/platforms/wasm/qwasmbackingstore.cpp | |
| parent | 1943183282defdbc846813e4ceb66c1eec28fec5 (diff) | |
wasm: Fix handling of native windows
There are two problems
1) internal (not toplevel) windows needs to have the frameLess attribute
set. Without this attribute the window is not visible
2) The backingstore needs to use the correct window, if not the
symptoms are that the display is not always correctly updated.
Seen in the qtdoc/examples/demos/documentviewer demo
Fixes: QTBUG-125856
Change-Id: I040d963c0c130214cc70a607090faa006c02f981
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmbackingstore.cpp')
| -rw-r--r-- | src/plugins/platforms/wasm/qwasmbackingstore.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/platforms/wasm/qwasmbackingstore.cpp b/src/plugins/platforms/wasm/qwasmbackingstore.cpp index a3c1ae8a502..c14d1f59e4e 100644 --- a/src/plugins/platforms/wasm/qwasmbackingstore.cpp +++ b/src/plugins/platforms/wasm/qwasmbackingstore.cpp @@ -39,11 +39,12 @@ QPaintDevice *QWasmBackingStore::paintDevice() void QWasmBackingStore::flush(QWindow *window, const QRegion ®ion, const QPoint &offset) { Q_UNUSED(window); - Q_UNUSED(region); - Q_UNUSED(offset); - m_dirty |= region; - m_compositor->handleBackingStoreFlush(window); + + QRect updateRect = region.boundingRect(); + updateRect.translate(offset); + + m_compositor->handleBackingStoreFlush(this->window(), updateRect); } void QWasmBackingStore::updateTexture(QWasmWindow *window) |
