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
This commit is contained in:
parent
1b75d4b71a
commit
815269a26f
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue