diff --git a/src/plugins/platforms/drm/drm_pipeline.cpp b/src/plugins/platforms/drm/drm_pipeline.cpp index 0b81bd4028..19f80a65f9 100644 --- a/src/plugins/platforms/drm/drm_pipeline.cpp +++ b/src/plugins/platforms/drm/drm_pipeline.cpp @@ -345,9 +345,9 @@ bool DrmPipeline::moveCursor(QPoint pos) return true; } if (drmModeMoveCursor(m_gpu->fd(), m_crtc->id(), pos.x(), pos.y()) != 0) { - m_cursor.pos = pos; return false; } + m_cursor.pos = pos; m_cursor.dirtyPos = false; return true; } @@ -359,6 +359,8 @@ bool DrmPipeline::setActive(bool active) if (drmModeSetCursor(m_gpu->fd(), m_crtc->id(), 0, 0, 0) != 0) { qCWarning(KWIN_DRM) << "Could not set cursor:" << strerror(errno); } + m_cursor.dirtyBo = true; + m_cursor.dirtyPos = true; } bool success = false; auto mode = m_connector->currentMode().mode; @@ -386,6 +388,7 @@ bool DrmPipeline::setActive(bool active) if (isActive()) { // enable cursor (again) setCursor(m_cursor.buffer, m_cursor.hotspot); + moveCursor(m_cursor.pos); } return success; }