summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmcursor.cpp
diff options
context:
space:
mode:
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();