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
parent
8cddfe5be0
commit
5432ffb76d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue