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/XDGOutput.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/protocols/XDGOutput.cpp') diff --git a/src/protocols/XDGOutput.cpp b/src/protocols/XDGOutput.cpp index d472df92..37ed990d 100644 --- a/src/protocols/XDGOutput.cpp +++ b/src/protocols/XDGOutput.cpp @@ -51,10 +51,9 @@ void CXDGOutputProtocol::onManagerGetXDGOutput(CZxdgOutputManagerV1* mgr, uint32 const auto PMONITOR = g_pCompositor->getMonitorFromOutput(OUTPUT); - const auto CLIENT = wl_resource_get_client(mgr->resource()); + const auto CLIENT = mgr->client(); - CXDGOutput* pXDGOutput = - m_vXDGOutputs.emplace_back(std::make_unique(std::make_shared(CLIENT, wl_resource_get_version(mgr->resource()), id), PMONITOR)).get(); + CXDGOutput* pXDGOutput = m_vXDGOutputs.emplace_back(std::make_unique(std::make_shared(CLIENT, mgr->version(), id), PMONITOR)).get(); #ifndef NO_XWAYLAND if (g_pXWaylandManager->m_sWLRXWayland && g_pXWaylandManager->m_sWLRXWayland->server && g_pXWaylandManager->m_sWLRXWayland->server->client == CLIENT) pXDGOutput->isXWayland = true; @@ -63,14 +62,14 @@ void CXDGOutputProtocol::onManagerGetXDGOutput(CZxdgOutputManagerV1* mgr, uint32 if (!pXDGOutput->resource->resource()) { m_vXDGOutputs.pop_back(); - wl_resource_post_no_memory(mgr->resource()); + mgr->noMemory(); return; } if (!PMONITOR) return; - const auto XDGVER = wl_resource_get_version(pXDGOutput->resource->resource()); + const auto XDGVER = pXDGOutput->resource->version(); if (XDGVER >= OUTPUT_NAME_SINCE_VERSION) pXDGOutput->resource->sendName(PMONITOR->szName.c_str()); @@ -120,6 +119,6 @@ void CXDGOutput::sendDetails() { else resource->sendLogicalSize(monitor->vecSize.x, monitor->vecSize.y); - if (wl_resource_get_version(resource->resource()) < OUTPUT_DONE_DEPRECATED_SINCE_VERSION) + if (resource->version() < OUTPUT_DONE_DEPRECATED_SINCE_VERSION) resource->sendDone(); } \ No newline at end of file -- cgit v1.2.3