diff options
| author | davc0n <dconti.dev@gmail.com> | 2025-04-30 23:45:20 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-30 23:45:20 +0200 |
| commit | 50e1bec85f8febdd78f50d94f140d07f9b34148d (patch) | |
| tree | ac8f53553ef3ca5dedb956a09442a23f762e0428 /src/protocols/OutputPower.cpp | |
| parent | b8a204c21d6b36a5b3ccf4c125553c61a9fd6b90 (diff) | |
helpers: refactor class member vars (#10218)
Diffstat (limited to 'src/protocols/OutputPower.cpp')
| -rw-r--r-- | src/protocols/OutputPower.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/protocols/OutputPower.cpp b/src/protocols/OutputPower.cpp index 24106817..55ea0376 100644 --- a/src/protocols/OutputPower.cpp +++ b/src/protocols/OutputPower.cpp @@ -13,25 +13,25 @@ COutputPower::COutputPower(SP<CZwlrOutputPowerV1> resource_, PHLMONITOR pMonitor if (!pMonitor) return; - pMonitor->dpmsStatus = mode == ZWLR_OUTPUT_POWER_V1_MODE_ON; + pMonitor->m_dpmsStatus = mode == ZWLR_OUTPUT_POWER_V1_MODE_ON; - pMonitor->output->state->setEnabled(mode == ZWLR_OUTPUT_POWER_V1_MODE_ON); + pMonitor->m_output->state->setEnabled(mode == ZWLR_OUTPUT_POWER_V1_MODE_ON); - if (!pMonitor->state.commit()) - LOGM(ERR, "Couldn't set dpms to {} for {}", pMonitor->dpmsStatus, pMonitor->szName); + if (!pMonitor->m_state.commit()) + LOGM(ERR, "Couldn't set dpms to {} for {}", pMonitor->m_dpmsStatus, pMonitor->m_name); }); - resource->sendMode(pMonitor->dpmsStatus ? ZWLR_OUTPUT_POWER_V1_MODE_ON : ZWLR_OUTPUT_POWER_V1_MODE_OFF); + resource->sendMode(pMonitor->m_dpmsStatus ? ZWLR_OUTPUT_POWER_V1_MODE_ON : ZWLR_OUTPUT_POWER_V1_MODE_OFF); - listeners.monitorDestroy = pMonitor->events.destroy.registerListener([this](std::any v) { + listeners.monitorDestroy = pMonitor->m_events.destroy.registerListener([this](std::any v) { pMonitor.reset(); resource->sendFailed(); }); - listeners.monitorDpms = pMonitor->events.dpmsChanged.registerListener( - [this](std::any v) { resource->sendMode(pMonitor->dpmsStatus ? ZWLR_OUTPUT_POWER_V1_MODE_ON : ZWLR_OUTPUT_POWER_V1_MODE_OFF); }); - listeners.monitorState = pMonitor->events.modeChanged.registerListener( - [this](std::any v) { resource->sendMode(pMonitor->dpmsStatus ? ZWLR_OUTPUT_POWER_V1_MODE_ON : ZWLR_OUTPUT_POWER_V1_MODE_OFF); }); + listeners.monitorDpms = pMonitor->m_events.dpmsChanged.registerListener( + [this](std::any v) { resource->sendMode(pMonitor->m_dpmsStatus ? ZWLR_OUTPUT_POWER_V1_MODE_ON : ZWLR_OUTPUT_POWER_V1_MODE_OFF); }); + listeners.monitorState = pMonitor->m_events.modeChanged.registerListener( + [this](std::any v) { resource->sendMode(pMonitor->m_dpmsStatus ? ZWLR_OUTPUT_POWER_V1_MODE_ON : ZWLR_OUTPUT_POWER_V1_MODE_OFF); }); } bool COutputPower::good() { |
