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) {
|
if (pending.cursorPos == pos) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
pending.cursorPos = pos;
|
||||||
bool result;
|
bool result;
|
||||||
const bool visibleBefore = isCursorVisible();
|
const bool visibleBefore = isCursorVisible();
|
||||||
// explicitly check for the cursor plane and not for AMS, as we might not always have one
|
// explicitly check for the cursor plane and not for AMS, as we might not always have one
|
||||||
if (pending.crtc->cursorPlane()) {
|
if (pending.crtc->cursorPlane()) {
|
||||||
pending.cursorPos = pos;
|
|
||||||
result = commitPipelines({this}, CommitMode::Test);
|
result = commitPipelines({this}, CommitMode::Test);
|
||||||
} else {
|
} else {
|
||||||
result = moveCursorLegacy();
|
result = moveCursorLegacy();
|
||||||
|
|
|
@ -128,12 +128,12 @@ bool DrmPipeline::setCursorLegacy()
|
||||||
pending.cursorBo ? pending.cursorBo->handle() : 0,
|
pending.cursorBo ? pending.cursorBo->handle() : 0,
|
||||||
s.width(), s.height());
|
s.width(), s.height());
|
||||||
}
|
}
|
||||||
return true;
|
return ret == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DrmPipeline::moveCursorLegacy()
|
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