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 <david.skoland@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
This commit is contained in:
Morten Sørvig 2022-04-13 21:55:28 +02:00
parent 7616e4aecf
commit 029f90f7ea

View File

@ -41,7 +41,7 @@ public:
static void setOverrideWasmCursor(QCursor *windowCursor, QScreen *screen); static void setOverrideWasmCursor(QCursor *windowCursor, QScreen *screen);
static void clearOverrideWasmCursor(QScreen *screen); static void clearOverrideWasmCursor(QScreen *screen);
private: private:
QByteArray htmlCursorName; QByteArray htmlCursorName = "default";
void setWasmCursor(QScreen *screen, const QByteArray &name); void setWasmCursor(QScreen *screen, const QByteArray &name);
}; };