backends/drm: fix legacy cursor
This commit is contained in:
parent
9537ea6d16
commit
2817e7581f
2 changed files with 3 additions and 3 deletions
|
@ -344,11 +344,11 @@ bool DrmPipeline::moveCursor(QPoint pos)
|
|||
if (pending.cursorPos == pos) {
|
||||
return true;
|
||||
}
|
||||
pending.cursorPos = pos;
|
||||
bool result;
|
||||
const bool visibleBefore = isCursorVisible();
|
||||
// explicitly check for the cursor plane and not for AMS, as we might not always have one
|
||||
if (pending.crtc->cursorPlane()) {
|
||||
pending.cursorPos = pos;
|
||||
result = commitPipelines({this}, CommitMode::Test);
|
||||
} else {
|
||||
result = moveCursorLegacy();
|
||||
|
|
|
@ -128,12 +128,12 @@ bool DrmPipeline::setCursorLegacy()
|
|||
pending.cursorBo ? pending.cursorBo->handle() : 0,
|
||||
s.width(), s.height());
|
||||
}
|
||||
return true;
|
||||
return ret == 0;
|
||||
}
|
||||
|
||||
bool DrmPipeline::moveCursorLegacy()
|
||||
{
|
||||
return drmModeMoveCursor(gpu()->fd(), pending.crtc->id(), pending.cursorPos.x(), pending.cursorPos.y()) != 0;
|
||||
return drmModeMoveCursor(gpu()->fd(), pending.crtc->id(), pending.cursorPos.x(), pending.cursorPos.y()) == 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue