backends/drm: set cursor again after it was hidden

This isn't necessary with atomic modesetting, as moving and setting are
the same thing. With legacy though, if the cursor was hidden, moving it
with the layer visible does not automatically show it again, so that needs
to be done explicitly

BUG: 461181


(cherry picked from commit 815269a26f234758f95a729c2323de552723639b)
icc-effect-5.27.2
Xaver Hugl 2023-02-09 20:42:45 +01:00
parent 8cddfe5be0
commit 5432ffb76d
1 changed files with 2 additions and 1 deletions

View File

@ -217,11 +217,12 @@ bool DrmOutput::moveCursor(const QPoint &position)
const QSize layerSize = m_gpu->cursorSize() / scale();
const QRect layerRect = monitorMatrix.mapRect(QRect(m_cursor.position, layerSize));
const auto layer = m_pipeline->cursorLayer();
const bool wasVisible = layer->isVisible();
layer->setVisible(true);
layer->setPosition(layerRect.topLeft());
m_moveCursorSuccessful = m_pipeline->moveCursor();
layer->setVisible(m_moveCursorSuccessful);
if (!m_moveCursorSuccessful) {
if (!m_moveCursorSuccessful || !wasVisible) {
m_pipeline->setCursor();
}
return m_moveCursorSuccessful;