summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlad Zahorodnii <vlad.zahorodnii@kde.org>2022-11-22 23:27:34 +0200
committerVlad Zahorodnii <vlad.zahorodnii@kde.org>2023-01-05 15:54:42 +0200
commite954853f0e68d78ac1a98bc3533713881496064c (patch)
tree6df406fb7f8f9e0d9a370e8ad5ccc17978b11275
parentca0555cb0a94fc17d8cf05406cb29eb3d45756f1 (diff)
Client: Fix handling of Qt::BlankCursor
The cursor may not be properly set when a window has Qt::BlankCursor and it's shown. In that case, the cursor surface may not be present and wl_pointer.set_cursor won't be called. On the other hand, wl_pointer.set_cursor must be always called when wl_pointer.enter is received. Pick-to: 6.5 Change-Id: I8540e7a02df1579b3380a1a1d4cfab42c1ab3104 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
-rw-r--r--src/client/qwaylandinputdevice.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp
index 30f197571..00e9e09fa 100644
--- a/src/client/qwaylandinputdevice.cpp
+++ b/src/client/qwaylandinputdevice.cpp
@@ -285,8 +285,7 @@ void QWaylandInputDevice::Pointer::updateCursor()
auto shape = seat()->mCursor.shape;
if (shape == Qt::BlankCursor) {
- if (mCursor.surface)
- mCursor.surface->hide();
+ getOrCreateCursorSurface()->hide();
return;
}