diff options
author | Vaxry <[email protected]> | 2024-05-01 19:40:35 +0100 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-05-01 19:40:35 +0100 |
commit | 0237e39f74a7facf51d40bc4c95f6ce8ce3cdc2e (patch) | |
tree | cbce01b6c5832b02a5b43a862b1953f46143e870 /src/protocols/IdleInhibit.cpp | |
parent | 47b087950dcfaf6fdda63c4d5f13efda3508a6fb (diff) | |
download | Hyprland-0237e39f74a7facf51d40bc4c95f6ce8ce3cdc2e.tar.gz Hyprland-0237e39f74a7facf51d40bc4c95f6ce8ce3cdc2e.zip |
protocols: utilize hyprwayland-scanner 0.3.3 functions
stuff like ::version(), ::client(), ::error() etc
Diffstat (limited to 'src/protocols/IdleInhibit.cpp')
-rw-r--r-- | src/protocols/IdleInhibit.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/protocols/IdleInhibit.cpp b/src/protocols/IdleInhibit.cpp index 0119755f..9960c00f 100644 --- a/src/protocols/IdleInhibit.cpp +++ b/src/protocols/IdleInhibit.cpp @@ -47,9 +47,8 @@ void CIdleInhibitProtocol::removeInhibitor(CIdleInhibitorResource* resource) { } void CIdleInhibitProtocol::onCreateInhibitor(CZwpIdleInhibitManagerV1* pMgr, uint32_t id, wlr_surface* surface) { - const auto CLIENT = wl_resource_get_client(pMgr->resource()); - const auto RESOURCE = - m_vInhibitors.emplace_back(std::make_shared<CIdleInhibitorResource>(std::make_shared<CZwpIdleInhibitorV1>(CLIENT, wl_resource_get_version(pMgr->resource()), id), surface)); + const auto CLIENT = pMgr->client(); + const auto RESOURCE = m_vInhibitors.emplace_back(std::make_shared<CIdleInhibitorResource>(std::make_shared<CZwpIdleInhibitorV1>(CLIENT, pMgr->version(), id), surface)); RESOURCE->inhibitor = std::make_shared<CIdleInhibitor>(RESOURCE, surface); events.newIdleInhibitor.emit(RESOURCE->inhibitor); |