From 029f90f7ea70282f4a213c912f36052f3b054259 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20S=C3=B8rvig?= Date: Wed, 13 Apr 2022 21:55:28 +0200 Subject: [PATCH] wasm: initialize htmlCursorName to "default" The canvas cursor should always be restored to "default" if no cursor is set, otherwise we get the I-beam cursor since the canvas is contenteditable. The code which handles setting and restoring the override cursors handles this correctly, however we also need to set the default htmlCursorName for cases where setOverrideWasmCursor() is not called. Pick-to: 6.3 Change-Id: I23be7847d3a30ab78e3a8c9ec402285246bfefec Reviewed-by: David Skoland Reviewed-by: Lorn Potter --- src/plugins/platforms/wasm/qwasmcursor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/wasm/qwasmcursor.h b/src/plugins/platforms/wasm/qwasmcursor.h index b8aef841b4e..824be3876fc 100644 --- a/src/plugins/platforms/wasm/qwasmcursor.h +++ b/src/plugins/platforms/wasm/qwasmcursor.h @@ -41,7 +41,7 @@ public: static void setOverrideWasmCursor(QCursor *windowCursor, QScreen *screen); static void clearOverrideWasmCursor(QScreen *screen); private: - QByteArray htmlCursorName; + QByteArray htmlCursorName = "default"; void setWasmCursor(QScreen *screen, const QByteArray &name); };