diff --git a/plugins/platforms/drm/drm_backend.cpp b/plugins/platforms/drm/drm_backend.cpp --- a/plugins/platforms/drm/drm_backend.cpp +++ b/plugins/platforms/drm/drm_backend.cpp @@ -702,7 +702,7 @@ void DrmBackend::doHideCursor() { - if (!m_cursorEnabled) { + if (!m_cursorEnabled || usesSoftwareCursor()) { return; } for (auto it = m_outputs.constBegin(); it != m_outputs.constEnd(); ++it) { @@ -712,7 +712,7 @@ void DrmBackend::moveCursor() { - if (!m_cursorEnabled || isCursorHidden()) { + if (!m_cursorEnabled || isCursorHidden() || usesSoftwareCursor()) { return; } for (auto it = m_outputs.constBegin(); it != m_outputs.constEnd(); ++it) { diff --git a/plugins/scenes/opengl/scene_opengl.cpp b/plugins/scenes/opengl/scene_opengl.cpp --- a/plugins/scenes/opengl/scene_opengl.cpp +++ b/plugins/scenes/opengl/scene_opengl.cpp @@ -596,8 +596,10 @@ */ void SceneOpenGL2::paintCursor() { - // don't paint if we use hardware cursor - if (!kwinApp()->platform()->usesSoftwareCursor()) { + // don't paint if we use hardware cursor or the cursor is hidden + if (!kwinApp()->platform()->usesSoftwareCursor() || + kwinApp()->platform()->isCursorHidden() || + kwinApp()->platform()->softwareCursor().isNull()) { return; } @@ -616,7 +618,7 @@ updateCursorTexture(); // handle shape update on case cursor image changed - connect(Cursor::self(), &Cursor::cursorChanged, this, updateCursorTexture); + connect(kwinApp()->platform(), &Platform::cursorChanged, this, updateCursorTexture); } // get cursor position in projection coordinates