diff options
| author | Mikolaj Boc <mikolaj.boc@qt.io> | 2022-11-14 09:12:34 +0100 |
|---|---|---|
| committer | Mikolaj Boc <mikolaj.boc@qt.io> | 2022-11-26 11:23:13 +0100 |
| commit | fa27a59ec3cfc173d5ff202feb23e8b6e398dac9 (patch) | |
| tree | a34f7a199611118e826a029a5bebf93f9425b32d /src/plugins/platforms/wasm/qwasmclipboard.cpp | |
| parent | c675c1c56d3c00b3c1de5aee8c7c6f7eeeb70bc1 (diff) | |
Use the browser compositor for drawing windows on WASM
Make the browser compositor draw the window non-client area (using css
+ html). Get rid of OpenGL usage in non-OpenGL windows and use canvas
2d context instead to blit the texture (QImage).
Also, as part of the change, remove the deprecated canvas element support
in QScreen.
Fixes: QTBUG-107116
Fixes: QTBUG-107219
Change-Id: I65f0d91831c806315685ca681ac0e416673f5cd5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: David Skoland <david.skoland@qt.io>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmclipboard.cpp')
| -rw-r--r-- | src/plugins/platforms/wasm/qwasmclipboard.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/wasm/qwasmclipboard.cpp b/src/plugins/platforms/wasm/qwasmclipboard.cpp index e2dae221493..c646f6b453c 100644 --- a/src/plugins/platforms/wasm/qwasmclipboard.cpp +++ b/src/plugins/platforms/wasm/qwasmclipboard.cpp @@ -225,14 +225,14 @@ void QWasmClipboard::initClipboardPermissions() })()); } -void QWasmClipboard::installEventHandlers(const emscripten::val &canvas) +void QWasmClipboard::installEventHandlers(const emscripten::val &screenElement) { emscripten::val cContext = val::undefined(); emscripten::val isChromium = val::global("window")["chrome"]; if (!isChromium.isUndefined()) { cContext = val::global("document"); } else { - cContext = canvas; + cContext = screenElement; } // Fallback path for browsers which do not support direct clipboard access cContext.call<void>("addEventListener", val("cut"), |
