From 87173bd09daa4b56adabcfc72a29aec957cb8a13 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sun, 21 Apr 2024 21:20:48 +0100 Subject: protocols: fix for hyprwayland-scanner update --- src/protocols/CursorShape.cpp | 2 +- src/protocols/TearingControl.cpp | 2 +- src/protocols/TearingControl.hpp | 2 +- src/protocols/XDGDecoration.cpp | 12 ++++++------ 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/protocols/CursorShape.cpp b/src/protocols/CursorShape.cpp index e94dda60..e04cccb4 100644 --- a/src/protocols/CursorShape.cpp +++ b/src/protocols/CursorShape.cpp @@ -86,7 +86,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(), ERROR_INVALID_SHAPE, "The shape is invalid"); + wl_resource_post_error(pMgr->resource(), WP_CURSOR_SHAPE_DEVICE_V1_ERROR_INVALID_SHAPE, "The shape is invalid"); return; } diff --git a/src/protocols/TearingControl.cpp b/src/protocols/TearingControl.cpp index 40167766..72f92355 100644 --- a/src/protocols/TearingControl.cpp +++ b/src/protocols/TearingControl.cpp @@ -68,7 +68,7 @@ void CTearingControl::updateWindow() { if (!pWindow) return; - pWindow->m_bTearingHint = hint == PRESENTATION_HINT_ASYNC; + pWindow->m_bTearingHint = hint == WP_TEARING_CONTROL_V1_PRESENTATION_HINT_ASYNC; } bool CTearingControl::good() { diff --git a/src/protocols/TearingControl.hpp b/src/protocols/TearingControl.hpp index b13bbb82..219a5e2d 100644 --- a/src/protocols/TearingControl.hpp +++ b/src/protocols/TearingControl.hpp @@ -28,7 +28,7 @@ class CTearingControl { SP resource; CWindow* pWindow = nullptr; - wpTearingControlV1PresentationHint hint = PRESENTATION_HINT_VSYNC; + wpTearingControlV1PresentationHint hint = WP_TEARING_CONTROL_V1_PRESENTATION_HINT_VSYNC; friend class CTearingControlProtocol; }; diff --git a/src/protocols/XDGDecoration.cpp b/src/protocols/XDGDecoration.cpp index 0f88870b..7a5303a3 100644 --- a/src/protocols/XDGDecoration.cpp +++ b/src/protocols/XDGDecoration.cpp @@ -11,19 +11,19 @@ CXDGDecoration::CXDGDecoration(SP resource_, wl_resou resource->setSetMode([this](CZxdgToplevelDecorationV1*, zxdgToplevelDecorationV1Mode mode) { std::string modeString; switch (mode) { - case zxdgToplevelDecorationV1Mode::MODE_CLIENT_SIDE: modeString = "MODE_CLIENT_SIDE"; break; - case zxdgToplevelDecorationV1Mode::MODE_SERVER_SIDE: modeString = "MODE_SERVER_SIDE"; break; + case ZXDG_TOPLEVEL_DECORATION_V1_MODE_CLIENT_SIDE: modeString = "MODE_CLIENT_SIDE"; break; + case ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE: modeString = "MODE_SERVER_SIDE"; break; default: modeString = "INVALID"; break; } Debug::log(LOG, "[xdgDecoration] setMode: {}. {} MODE_SERVER_SIDE as reply.", modeString, - (mode == zxdgToplevelDecorationV1Mode::MODE_SERVER_SIDE ? "Sending" : "Ignoring and sending")); - resource->sendConfigure(zxdgToplevelDecorationV1Mode::MODE_SERVER_SIDE); + (mode == ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE ? "Sending" : "Ignoring and sending")); + resource->sendConfigure(ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE); }); resource->setUnsetMode([this](CZxdgToplevelDecorationV1*) { Debug::log(LOG, "[xdgDecoration] unsetMode. Sending MODE_SERVER_SIDE."); - resource->sendConfigure(zxdgToplevelDecorationV1Mode::MODE_SERVER_SIDE); + resource->sendConfigure(ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE); }); } @@ -57,7 +57,7 @@ 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(), zxdgToplevelDecorationV1Error::ERROR_ALREADY_CONSTRUCTED, "Decoration object already exists"); + wl_resource_post_error(pMgr->resource(), ZXDG_TOPLEVEL_DECORATION_V1_ERROR_ALREADY_CONSTRUCTED, "Decoration object already exists"); return; } -- cgit v1.2.3