diff --git a/pointer_input.cpp b/pointer_input.cpp index 55af1502a9..3a9f0a5bf9 100644 --- a/pointer_input.cpp +++ b/pointer_input.cpp @@ -973,8 +973,6 @@ CursorImage::CursorImage(PointerInputRedirection *parent) m_surfaceRenderedTimer.start(); connect(&m_waylandImage, &WaylandCursorImage::themeChanged, this, [this] { - m_cursors.clear(); - m_cursorsByName.clear(); loadThemeCursor(Qt::ArrowCursor, &m_fallbackCursor); updateDecorationCursor(); updateMoveResize(); @@ -1262,12 +1260,12 @@ void CursorImage::updateDragCursor() void CursorImage::loadThemeCursor(CursorShape shape, WaylandCursorImage::Image *image) { - m_waylandImage.loadThemeCursor(shape, m_cursors, image); + m_waylandImage.loadThemeCursor(shape, image); } void CursorImage::loadThemeCursor(const QByteArray &shape, WaylandCursorImage::Image *image) { - m_waylandImage.loadThemeCursor(shape, m_cursorsByName, image); + m_waylandImage.loadThemeCursor(shape, image); } template @@ -1302,18 +1300,6 @@ void WaylandCursorImage::loadThemeCursor(const T &shape, Image *image) *image = {img, QPoint(hotSpotX, hotSpotY)}; } -template -void WaylandCursorImage::loadThemeCursor(const T &shape, QHash &cursors, Image *image) -{ - auto it = cursors.constFind(shape); - if (it == cursors.constEnd()) { - loadThemeCursor(shape, image); - cursors.insert(shape, *image); - } else { - *image = it.value(); - } -} - void CursorImage::reevaluteSource() { if (waylandServer()->seat()->isDragPointer()) { diff --git a/pointer_input.h b/pointer_input.h index 1ae6a75053..fae8d1203d 100644 --- a/pointer_input.h +++ b/pointer_input.h @@ -189,9 +189,6 @@ public: template void loadThemeCursor(const T &shape, Image *image); - template - void loadThemeCursor(const T &shape, QHash &cursors, Image *image); - Q_SIGNALS: void themeChanged(); @@ -253,8 +250,6 @@ private: WaylandCursorImage::Image m_fallbackCursor; WaylandCursorImage::Image m_moveResizeCursor; WaylandCursorImage::Image m_windowSelectionCursor; - QHash m_cursors; - QHash m_cursorsByName; QElapsedTimer m_surfaceRenderedTimer; struct { WaylandCursorImage::Image cursor;