From 416f55cea3edc3e24eb70296f551d790ce6dac67 Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Thu, 23 Sep 2021 13:36:13 +0200 Subject: [PATCH] platforms/drm: fix hidden cursor BUG: 438824 --- src/plugins/platforms/drm/drm_pipeline.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; }