diff options
| author | Bang Lee <qusicx@gmail.com> | 2025-10-18 11:44:55 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-18 20:44:55 +0200 |
| commit | 39d62e1487052da2751ec1e36d243e3e92e24f6a (patch) | |
| tree | 0eb4b8f1e69a1b9f4d2d417324cf02177c55a904 /src/protocols/OutputPower.cpp | |
| parent | 6607c6440d4e3e7313e421f6258b52e6b7982170 (diff) | |
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().
Diffstat (limited to 'src/protocols/OutputPower.cpp')
| -rw-r--r-- | src/protocols/OutputPower.cpp | 7 |
1 files changed, 1 insertions, 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<CZwlrOutputPowerV1> 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); |
