From 39d62e1487052da2751ec1e36d243e3e92e24f6a Mon Sep 17 00:00:00 2001 From: Bang Lee Date: Sat, 18 Oct 2025 11:44:55 -0700 Subject: [PATCH] protocols: fix output power protocol not sending mode confirmation (#12072) Use setDPMS() instead of directly manipulating m_dpmsStatus to ensure the dpmsChanged event fires and protocol clients receive mode change confirmation via sendMode(). --- src/protocols/OutputPower.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/protocols/OutputPower.cpp b/src/protocols/OutputPower.cpp index e3cc7336..f97abf85 100644 --- a/src/protocols/OutputPower.cpp +++ b/src/protocols/OutputPower.cpp @@ -13,12 +13,7 @@ COutputPower::COutputPower(SP resource_, PHLMONITOR pMonitor if (!m_monitor) return; - m_monitor->m_dpmsStatus = mode == ZWLR_OUTPUT_POWER_V1_MODE_ON; - - m_monitor->m_output->state->setEnabled(mode == ZWLR_OUTPUT_POWER_V1_MODE_ON); - - if (!m_monitor->m_state.commit()) - LOGM(ERR, "Couldn't set dpms to {} for {}", m_monitor->m_dpmsStatus, m_monitor->m_name); + m_monitor->setDPMS(mode == ZWLR_OUTPUT_POWER_V1_MODE_ON); }); m_resource->sendMode(m_monitor->m_dpmsStatus ? ZWLR_OUTPUT_POWER_V1_MODE_ON : ZWLR_OUTPUT_POWER_V1_MODE_OFF);