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/CursorShape.cpp | |
| parent | 47b087950dcfaf6fdda63c4d5f13efda3508a6fb (diff) | |
protocols: utilize hyprwayland-scanner 0.3.3 functions
stuff like ::version(), ::client(), ::error() etc
Diffstat (limited to 'src/protocols/CursorShape.cpp')
| -rw-r--r-- | src/protocols/CursorShape.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/protocols/CursorShape.cpp b/src/protocols/CursorShape.cpp index 44f6a84f..a390f852 100644 --- a/src/protocols/CursorShape.cpp +++ b/src/protocols/CursorShape.cpp @@ -73,8 +73,8 @@ void CCursorShapeProtocol::onGetTabletToolV2(CWpCursorShapeManagerV1* pMgr, uint } void CCursorShapeProtocol::createCursorShapeDevice(CWpCursorShapeManagerV1* pMgr, uint32_t id, wl_resource* resource) { - const auto CLIENT = wl_resource_get_client(pMgr->resource()); - const auto RESOURCE = m_vDevices.emplace_back(std::make_shared<CWpCursorShapeDeviceV1>(CLIENT, wl_resource_get_version(pMgr->resource()), id)); + const auto CLIENT = pMgr->client(); + const auto RESOURCE = m_vDevices.emplace_back(std::make_shared<CWpCursorShapeDeviceV1>(CLIENT, pMgr->version(), id)); RESOURCE->setOnDestroy([this](CWpCursorShapeDeviceV1* p) { this->onDeviceResourceDestroy(p->resource()); }); RESOURCE->setDestroy([this](CWpCursorShapeDeviceV1* p) { this->onDeviceResourceDestroy(p->resource()); }); @@ -83,7 +83,7 @@ void CCursorShapeProtocol::createCursorShapeDevice(CWpCursorShapeManagerV1* pMgr void CCursorShapeProtocol::onSetShape(CWpCursorShapeDeviceV1* pMgr, uint32_t serial, wpCursorShapeDeviceV1Shape shape) { if ((uint32_t)shape == 0 || (uint32_t)shape > sizeof(SHAPE_NAMES)) { - wl_resource_post_error(pMgr->resource(), WP_CURSOR_SHAPE_DEVICE_V1_ERROR_INVALID_SHAPE, "The shape is invalid"); + pMgr->error(WP_CURSOR_SHAPE_DEVICE_V1_ERROR_INVALID_SHAPE, "The shape is invalid"); return; } |
