wasm: make setting the cursor shape work again
Commit 960af0d64 ported away from EM_ASM but also
changed the logic. Set the canvas.style.cursor property,
like it originally did.
Change-Id: Ie4b23abeae54173894bff1db000a305c459684bb
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
bb10
parent
3d7616a316
commit
b5c16921cc
|
|
@ -53,7 +53,8 @@ void QWasmCursor::changeCursor(QCursor *windowCursor, QWindow *window)
|
|||
htmlCursorName = "auto";
|
||||
|
||||
// Set cursor on the main canvas
|
||||
emscripten::val::global("window").set("cursor", emscripten::val(htmlCursorName.constData()));
|
||||
emscripten::val canvasStyle = emscripten::val::module_property("canvas")["style"];
|
||||
canvasStyle.set("cursor", emscripten::val(htmlCursorName.constData()));
|
||||
}
|
||||
|
||||
QByteArray QWasmCursor::cursorShapeToHtml(Qt::CursorShape shape)
|
||||
|
|
|
|||
Loading…
Reference in New Issue