From fd5807ecb7e96f64d263e224b77106d2ab2cf6e8 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 31 Mar 2023 11:38:45 +0300 Subject: [PATCH] backends/drm: Fix enabled state "props->enabled" checks whether std::optional has a value, that's not what we want. --- src/backends/drm/drm_output.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backends/drm/drm_output.cpp b/src/backends/drm/drm_output.cpp index c9c5328c2f..e0bf59a288 100644 --- a/src/backends/drm/drm_output.cpp +++ b/src/backends/drm/drm_output.cpp @@ -427,7 +427,7 @@ void DrmOutput::applyQueuedChanges(const std::shared_ptr &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);