From 0237e39f74a7facf51d40bc4c95f6ce8ce3cdc2e Mon Sep 17 00:00:00 2001 From: Vaxry Date: Wed, 1 May 2024 19:40:35 +0100 Subject: protocols: utilize hyprwayland-scanner 0.3.3 functions stuff like ::version(), ::client(), ::error() etc --- src/protocols/XDGDecoration.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/protocols/XDGDecoration.cpp') diff --git a/src/protocols/XDGDecoration.cpp b/src/protocols/XDGDecoration.cpp index b62f89bc..f4d19432 100644 --- a/src/protocols/XDGDecoration.cpp +++ b/src/protocols/XDGDecoration.cpp @@ -58,18 +58,17 @@ void CXDGDecorationProtocol::destroyDecoration(CXDGDecoration* decoration) { void CXDGDecorationProtocol::onGetDecoration(CZxdgDecorationManagerV1* pMgr, uint32_t id, wl_resource* xdgToplevel) { if (m_mDecorations.contains(xdgToplevel)) { - wl_resource_post_error(pMgr->resource(), ZXDG_TOPLEVEL_DECORATION_V1_ERROR_ALREADY_CONSTRUCTED, "Decoration object already exists"); + pMgr->error(ZXDG_TOPLEVEL_DECORATION_V1_ERROR_ALREADY_CONSTRUCTED, "Decoration object already exists"); return; } - const auto CLIENT = wl_resource_get_client(pMgr->resource()); + const auto CLIENT = pMgr->client(); const auto RESOURCE = - m_mDecorations - .emplace(xdgToplevel, std::make_unique(std::make_shared(CLIENT, wl_resource_get_version(pMgr->resource()), id), xdgToplevel)) + m_mDecorations.emplace(xdgToplevel, std::make_unique(std::make_shared(CLIENT, pMgr->version(), id), xdgToplevel)) .first->second.get(); if (!RESOURCE->good()) { - wl_resource_post_no_memory(pMgr->resource()); + pMgr->noMemory(); m_mDecorations.erase(xdgToplevel); return; } -- cgit v1.2.3