backends/drm: Fix enabled state

"props->enabled" checks whether std::optional has a value, that's not
what we want.
This commit is contained in:
Vlad Zahorodnii 2023-03-31 11:38:45 +03:00
parent a04609b46f
commit fd5807ecb7

View file

@ -427,7 +427,7 @@ void DrmOutput::applyQueuedChanges(const std::shared_ptr<OutputChangeSet> &props
m_pipeline->applyPendingChanges();
State next = m_state;
next.enabled = props->enabled && m_pipeline->crtc();
next.enabled = props->enabled.value_or(m_state.enabled) && m_pipeline->crtc();
next.position = props->pos.value_or(m_state.position);
next.scale = props->scale.value_or(m_state.scale);
next.transform = props->transform.value_or(m_state.transform);