aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/protocols/IdleInhibit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocols/IdleInhibit.cpp')
-rw-r--r--src/protocols/IdleInhibit.cpp5
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);