mirror of
https://github.com/hyprwm/Hyprland
synced 2025-12-20 15:50:05 +01:00
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().
This commit is contained in:
parent
6607c6440d
commit
39d62e1487
1 changed files with 1 additions and 6 deletions
|
|
@ -13,12 +13,7 @@ COutputPower::COutputPower(SP<CZwlrOutputPowerV1> resource_, PHLMONITOR pMonitor
|
||||||
if (!m_monitor)
|
if (!m_monitor)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_monitor->m_dpmsStatus = mode == ZWLR_OUTPUT_POWER_V1_MODE_ON;
|
m_monitor->setDPMS(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_resource->sendMode(m_monitor->m_dpmsStatus ? ZWLR_OUTPUT_POWER_V1_MODE_ON : ZWLR_OUTPUT_POWER_V1_MODE_OFF);
|
m_resource->sendMode(m_monitor->m_dpmsStatus ? ZWLR_OUTPUT_POWER_V1_MODE_ON : ZWLR_OUTPUT_POWER_V1_MODE_OFF);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue