diff options
author | Kai Uwe Broulik <kde@privat.broulik.de> | 2023-08-27 21:10:54 +0200 |
---|---|---|
committer | Kai Uwe Broulik <kde@privat.broulik.de> | 2023-08-28 09:31:16 +0200 |
commit | ee8906f8960facec9ea029212553c5a06f84a2b8 (patch) | |
tree | 7aef5831dd7fc5f0610ed6d9a09d3c0588a6475e /src/client/qwaylandinputdevice.cpp | |
parent | 30216b545f3ef0a9bf465e57ba04b054d2a96728 (diff) |
QWaylandInputDevice: Don't create cursor surface just for hiding it
Just call set_cursor(null) directly.
Pick-to: 6.6
Change-Id: Id10b7d41775a41c805962d77fba2d7d2b19956d0
Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src/client/qwaylandinputdevice.cpp')
-rw-r--r-- | src/client/qwaylandinputdevice.cpp | 12 |
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; } |