summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmwindow.cpp
diff options
context:
space:
mode:
authorMorten Sørvig <[email protected]>2024-09-09 02:27:31 +0200
committerMorten Sørvig <[email protected]>2024-10-22 18:53:57 +0200
commita8286206439c51735f9ef9af1ad0d8454d1cdf27 (patch)
treea324cdec4e2f2b33d9b3e46155682ad2708cd1f7 /src/plugins/platforms/wasm/qwasmwindow.cpp
parent92b03232406498d39ecffe4b41c62d2035576508 (diff)
wasm: move input event handlers to windowContents
This html element should have all input event handling. Task-number: QTBUG-128732 Change-Id: I0da76ec410dad3165212ad5fc06f575acb07c3da Reviewed-by: Piotr Wierciński <[email protected]> Reviewed-by: Tor Arne Vestbø <[email protected]>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmwindow.cpp')
-rw-r--r--src/plugins/platforms/wasm/qwasmwindow.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/platforms/wasm/qwasmwindow.cpp b/src/plugins/platforms/wasm/qwasmwindow.cpp
index 3b898eb29b3..84a5abfcfc4 100644
--- a/src/plugins/platforms/wasm/qwasmwindow.cpp
+++ b/src/plugins/platforms/wasm/qwasmwindow.cpp
@@ -101,11 +101,11 @@ QWasmWindow::QWasmWindow(QWindow *w, QWasmDeadKeySupport *deadKeySupport,
m_flags = window()->flags();
- m_pointerEnterCallback = std::make_unique<qstdweb::EventCallback>(m_qtWindow, "pointerenter",
+ m_pointerEnterCallback = std::make_unique<qstdweb::EventCallback>(m_windowContents, "pointerenter",
[this](emscripten::val event) { this->handlePointerEvent(event); });
- m_pointerLeaveCallback = std::make_unique<qstdweb::EventCallback>(m_qtWindow, "pointerleave",
+ m_pointerLeaveCallback = std::make_unique<qstdweb::EventCallback>(m_windowContents, "pointerleave",
[this](emscripten::val event) { this->handlePointerEvent(event); });
- m_wheelEventCallback = std::make_unique<qstdweb::EventCallback>( m_qtWindow, "wheel",
+ m_wheelEventCallback = std::make_unique<qstdweb::EventCallback>( m_windowContents, "wheel",
[this](emscripten::val event) { this->handleWheelEvent(event); });
QWasmInputContext *wasmInput = QWasmIntegration::get()->wasmInputContext();
@@ -118,9 +118,9 @@ QWasmWindow::QWasmWindow(QWindow *w, QWasmDeadKeySupport *deadKeySupport,
[this](emscripten::val event) { this->handleKeyForInputContextEvent(event); });
}
- m_keyDownCallback = std::make_unique<qstdweb::EventCallback>(m_qtWindow, "keydown",
+ m_keyDownCallback = std::make_unique<qstdweb::EventCallback>(m_windowContents, "keydown",
[this](emscripten::val event) { this->handleKeyEvent(event); });
- m_keyUpCallback =std::make_unique<qstdweb::EventCallback>(m_qtWindow, "keyup",
+ m_keyUpCallback =std::make_unique<qstdweb::EventCallback>(m_windowContents, "keyup",
[this](emscripten::val event) { this->handleKeyEvent(event); });
setParent(parent());