summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmcursor.cpp
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2022-11-11 09:29:17 +0200
committerTarja Sundqvist <tarja.sundqvist@qt.io>2022-11-11 09:29:17 +0200
commit4ee4fc18b4067b90efa46ca9baba74f53b54d9ec (patch)
treecc68622c9b85992d99a8373ab55471ee821a4ebf /src/plugins/platforms/wasm/qwasmcursor.cpp
parentab28ff2207e8f33754c79793089dbf943d67736d (diff)
parentebb49c66aaf22ed55d62ff7bc3690fce00b7d8ba (diff)
Merge remote-tracking branch 'origin/tqtc/lts-5.15.8' into tqtc/lts-5.15-opensourcev5.15.8-lts-lgpl
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmcursor.cpp')
-rw-r--r--src/plugins/platforms/wasm/qwasmcursor.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/plugins/platforms/wasm/qwasmcursor.cpp b/src/plugins/platforms/wasm/qwasmcursor.cpp
index 61204517ce..4b4bb61071 100644
--- a/src/plugins/platforms/wasm/qwasmcursor.cpp
+++ b/src/plugins/platforms/wasm/qwasmcursor.cpp
@@ -41,20 +41,24 @@ using namespace emscripten;
void QWasmCursor::changeCursor(QCursor *windowCursor, QWindow *window)
{
- if (!windowCursor || !window)
+ if (!window)
return;
QScreen *screen = window->screen();
if (!screen)
return;
- // Bitmap and custom cursors are not implemented (will fall back to "auto")
- if (windowCursor->shape() == Qt::BitmapCursor || windowCursor->shape() >= Qt::CustomCursor)
- qWarning() << "QWasmCursor: bitmap and custom cursors are not supported";
+ QByteArray htmlCursorName;
+ if (windowCursor) {
- QByteArray htmlCursorName = cursorShapeToHtml(windowCursor->shape());
+ // Bitmap and custom cursors are not implemented (will fall back to "auto")
+ if (windowCursor->shape() == Qt::BitmapCursor || windowCursor->shape() >= Qt::CustomCursor)
+ qWarning() << "QWasmCursor: bitmap and custom cursors are not supported";
+
+ htmlCursorName = cursorShapeToHtml(windowCursor->shape());
+ }
if (htmlCursorName.isEmpty())
- htmlCursorName = "auto";
+ htmlCursorName = "default";
// Set cursor on the canvas
val canvas = QWasmScreen::get(screen)->canvas();