summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Uwe Broulik <kde@privat.broulik.de>2023-08-27 21:10:54 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-08-28 08:03:09 +0000
commit6635f29b8b7e71da6d3b82b2fd33d474c9792db7 (patch)
treeedfa2b51ebaae28dc57e3383bc99f70c3979a1ca
parent9f21136a49de36c4e0648917c7d344338841b314 (diff)
QWaylandInputDevice: Don't create cursor surface just for hiding it
Just call set_cursor(null) directly. Change-Id: Id10b7d41775a41c805962d77fba2d7d2b19956d0 Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org> Reviewed-by: David Edmundson <davidedmundson@kde.org> (cherry picked from commit ee8906f8960facec9ea029212553c5a06f84a2b8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/client/qwaylandinputdevice.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp
index 2a5cf9003..4eba3c589 100644
--- a/src/client/qwaylandinputdevice.cpp
+++ b/src/client/qwaylandinputdevice.cpp
@@ -191,14 +191,6 @@ public:
m_hotspot = QPoint();
}
- void hide()
- {
- uint serial = m_pointer->mEnterSerial;
- Q_ASSERT(serial);
- m_pointer->set_cursor(serial, nullptr, 0, 0);
- reset();
- }
-
// Size and hotspot are in surface coordinates
void update(wl_buffer *buffer, const QPoint &hotspot, const QSize &size, int bufferScale, bool animated = false)
{
@@ -297,7 +289,9 @@ void QWaylandInputDevice::Pointer::updateCursor()
auto shape = seat()->mCursor.shape;
if (shape == Qt::BlankCursor) {
- getOrCreateCursorSurface()->hide();
+ if (mCursor.surface)
+ mCursor.surface->reset();
+ set_cursor(mEnterSerial, nullptr, 0, 0);
return;
}