summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmwindow.h
diff options
context:
space:
mode:
authorMorten Sørvig <[email protected]>2024-08-29 15:06:51 +0200
committerMorten Johan Sørvig <[email protected]>2024-09-03 14:42:24 +0000
commit3117d88cdf2324a7833cdf9ceecc4cba30e1e090 (patch)
tree93560ad5e4d3080e1495ee1ad70f0184b2e3616d /src/plugins/platforms/wasm/qwasmwindow.h
parent051488c5faf5410e938978d4c1609c7a85074c57 (diff)
wasm: simplify QWasmWindow constructor
The code implements parts of the event handling as lambdas in the constructor. This makes it hard to see what the constructor code itself does. Instead, move the initial handling of the emscripten::val event to event handler functions, which then call the existing process event functions. Pick-to: 6.8 Change-Id: I3abc5be47b080c772c699c21f2fe1cc555ff8192 Reviewed-by: Tor Arne Vestbø <[email protected]> Reviewed-by: Piotr Wierciński <[email protected]>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmwindow.h')
-rw-r--r--src/plugins/platforms/wasm/qwasmwindow.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/platforms/wasm/qwasmwindow.h b/src/plugins/platforms/wasm/qwasmwindow.h
index 480ad6de721..9e259e58f68 100644
--- a/src/plugins/platforms/wasm/qwasmwindow.h
+++ b/src/plugins/platforms/wasm/qwasmwindow.h
@@ -123,9 +123,13 @@ private:
void applyWindowState();
void commitParent(QWasmWindowTreeNode *parent);
+ void handleKeyEvent(const emscripten::val &event);
bool processKey(const KeyEvent &event);
+ void handleKeyForInputContextEvent(const emscripten::val &event);
bool processKeyForInputContext(const KeyEvent &event);
+ void handlePointerEvent(const emscripten::val &event);
bool processPointer(const PointerEvent &event);
+ void handleWheelEvent(const emscripten::val &event);
bool processWheel(const WheelEvent &event);
QWindow *m_window = nullptr;