diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-05-01 19:40:35 +0100 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-05-01 19:40:35 +0100 |
| commit | 0237e39f74a7facf51d40bc4c95f6ce8ce3cdc2e (patch) | |
| tree | cbce01b6c5832b02a5b43a862b1953f46143e870 /src/protocols/OutputPower.cpp | |
| parent | 47b087950dcfaf6fdda63c4d5f13efda3508a6fb (diff) | |
protocols: utilize hyprwayland-scanner 0.3.3 functions
stuff like ::version(), ::client(), ::error() etc
Diffstat (limited to 'src/protocols/OutputPower.cpp')
| -rw-r--r-- | src/protocols/OutputPower.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/protocols/OutputPower.cpp b/src/protocols/OutputPower.cpp index 48e713f5..fae1a131 100644 --- a/src/protocols/OutputPower.cpp +++ b/src/protocols/OutputPower.cpp @@ -64,16 +64,15 @@ void COutputPowerProtocol::onGetOutputPower(CZwlrOutputPowerManagerV1* pMgr, uin const auto PMONITOR = g_pCompositor->getMonitorFromOutput(wlr_output_from_resource(output)); if (!PMONITOR) { - wl_resource_post_error(pMgr->resource(), 0, "Invalid output resource"); + pMgr->error(0, "Invalid output resource"); return; } - const auto CLIENT = wl_resource_get_client(pMgr->resource()); - const auto RESOURCE = - m_vOutputPowers.emplace_back(std::make_unique<COutputPower>(std::make_shared<CZwlrOutputPowerV1>(CLIENT, wl_resource_get_version(pMgr->resource()), id), PMONITOR)).get(); + const auto CLIENT = pMgr->client(); + const auto RESOURCE = m_vOutputPowers.emplace_back(std::make_unique<COutputPower>(std::make_shared<CZwlrOutputPowerV1>(CLIENT, pMgr->version(), id), PMONITOR)).get(); if (!RESOURCE->good()) { - wl_resource_post_no_memory(pMgr->resource()); + pMgr->noMemory(); m_vOutputPowers.pop_back(); return; } |
