[platforms/drm] show cursor only when it is enabled
In previous code we used to update/show cursor even when the pointer device was present, e.g mobile device. Guard it behind the cursor enabled check. BUG: 418977 FIXED-IN: 5.19.0
This commit is contained in:
parent
7569bdf6a3
commit
b2df11bf7e
2 changed files with 15 additions and 6 deletions
|
@ -132,6 +132,10 @@ public:
|
|||
|
||||
QString supportInformation() const override;
|
||||
|
||||
bool isCursorEnabled() const {
|
||||
return m_cursorEnabled;
|
||||
};
|
||||
|
||||
public Q_SLOTS:
|
||||
void turnOutputsOn();
|
||||
|
||||
|
|
|
@ -709,9 +709,12 @@ void DrmOutput::updateTransform(Transform transform)
|
|||
}
|
||||
m_modesetRequested = true;
|
||||
|
||||
// the cursor might need to get rotated
|
||||
updateCursor();
|
||||
showCursor();
|
||||
// show cursor only if is enabled, i.e if pointer device is presentP
|
||||
if (m_backend->isCursorEnabled()) {
|
||||
// the cursor might need to get rotated
|
||||
updateCursor();
|
||||
showCursor();
|
||||
}
|
||||
}
|
||||
|
||||
void DrmOutput::updateMode(int modeIndex)
|
||||
|
@ -867,9 +870,11 @@ bool DrmOutput::presentAtomically(DrmBuffer *buffer)
|
|||
m_primaryPlane->setTransformation(m_lastWorkingState.planeTransformations);
|
||||
}
|
||||
m_modesetRequested = true;
|
||||
// the cursor might need to get rotated
|
||||
updateCursor();
|
||||
showCursor();
|
||||
if (m_backend->isCursorEnabled()) {
|
||||
// the cursor might need to get rotated
|
||||
updateCursor();
|
||||
showCursor();
|
||||
}
|
||||
// TODO: forward to OutputInterface and OutputDeviceInterface
|
||||
setWaylandMode();
|
||||
emit screens()->changed();
|
||||
|
|
Loading…
Reference in a new issue