summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmevent.cpp
diff options
context:
space:
mode:
authorMikolaj Boc <mikolaj.boc@qt.io>2022-12-20 15:56:49 +0100
committerMikolaj Boc <mikolaj.boc@qt.io>2022-12-22 19:39:00 +0100
commitc15a8750bcce3d4dabeebcc8bb4c15db31c7f637 (patch)
tree6e9eccefbe350488b4c2d51fbd142a0b19e86d19 /src/plugins/platforms/wasm/qwasmevent.cpp
parentcf2651ae80a34b388a6bbb41b5e62c7b352e8a80 (diff)
Handle the mouse events in the window itself
It is now not the screen that handles all of the events and relays them to individual windows, but the window elements themselves. This allows us to get rid of manual window targeting logic and let the browser do its job. Fixes: QTBUG-107217 Pick-to: 6.5 Change-Id: I4dc5a74b1343f027f72c1da4623b99cd28bfbb38 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmevent.cpp')
-rw-r--r--src/plugins/platforms/wasm/qwasmevent.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/wasm/qwasmevent.cpp b/src/plugins/platforms/wasm/qwasmevent.cpp
index 7276087033..d4f9991feb 100644
--- a/src/plugins/platforms/wasm/qwasmevent.cpp
+++ b/src/plugins/platforms/wasm/qwasmevent.cpp
@@ -39,7 +39,7 @@ std::optional<PointerEvent> PointerEvent::fromWeb(emscripten::val event)
return std::nullopt;
ret.type = *eventType;
- ret.currentTarget = event["currentTarget"];
+ ret.target = event["target"];
ret.pointerType = event["pointerType"].as<std::string>() == "mouse" ?
PointerType::Mouse : PointerType::Other;
ret.mouseButton = MouseEvent::buttonFromWeb(event["button"].as<int>());