diff options
author | Mikolaj Boc <mikolaj.boc@qt.io> | 2022-10-13 10:55:37 +0200 |
---|---|---|
committer | Mikolaj Boc <mikolaj.boc@qt.io> | 2022-12-05 22:26:59 +0100 |
commit | e50bc60e878adbf5d43ae3992c2b98596082e704 (patch) | |
tree | 814b5c84d5e02d44819f605a0c9f2d0bc4344b80 /src/plugins/platforms/wasm/qwasmevent.cpp | |
parent | f546f3700b376fb25de38958e0ab2ca880f9629a (diff) |
Resize wasm windows using a div outline
Introducing a div outline which handles the resize events by itself.
Manual computations in wasm compositor are no longer needed.
The outline reacts to setting css variables (border-width,
resize-outline-width), it sets the correct cursors using css and
always keeps the correct size.
Fixes: QTBUG-107498
Change-Id: I6b0564632af5e17e464fe93a3dfa20820c624292
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.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/wasm/qwasmevent.cpp b/src/plugins/platforms/wasm/qwasmevent.cpp index f066d0041e..452a22ad5c 100644 --- a/src/plugins/platforms/wasm/qwasmevent.cpp +++ b/src/plugins/platforms/wasm/qwasmevent.cpp @@ -44,6 +44,7 @@ std::optional<PointerEvent> PointerEvent::fromWeb(emscripten::val event) ret.mouseButton = MouseEvent::buttonFromWeb(event["button"].as<int>()); ret.mouseButtons = MouseEvent::buttonsFromWeb(event["buttons"].as<unsigned short>()); ret.point = QPoint(event["offsetX"].as<int>(), event["offsetY"].as<int>()); + ret.pointInViewport = QPoint(event["x"].as<int>(), event["y"].as<int>()); ret.pointerId = event["pointerId"].as<int>(); ret.modifiers = KeyboardModifier::getForEvent(event); |