From beee22a95ed9044950e5486f22edd813e00ffa2c Mon Sep 17 00:00:00 2001 From: Kamikadze <40305144+Kam1k4dze@users.noreply.github.com> Date: Thu, 14 Aug 2025 19:44:56 +0500 Subject: refactor: Use new hyprutils casts (#11377) --- src/protocols/TextInputV1.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/protocols/TextInputV1.cpp') diff --git a/src/protocols/TextInputV1.cpp b/src/protocols/TextInputV1.cpp index d7a0eb49..7143b081 100644 --- a/src/protocols/TextInputV1.cpp +++ b/src/protocols/TextInputV1.cpp @@ -37,8 +37,8 @@ CTextInputV1::CTextInputV1(SP resource_) : m_resource(resource_ [this](CZwpTextInputV1* pMgr, const char* text, uint32_t cursor, uint32_t anchor) { m_pendingSurrounding = {true, std::string(text), cursor, anchor}; }); m_resource->setSetContentType([this](CZwpTextInputV1* pMgr, uint32_t hint, uint32_t purpose) { - m_pendingContentType = {true, hint == (uint32_t)ZWP_TEXT_INPUT_V1_CONTENT_HINT_DEFAULT ? (uint32_t)ZWP_TEXT_INPUT_V1_CONTENT_HINT_NONE : hint, - purpose > (uint32_t)ZWP_TEXT_INPUT_V1_CONTENT_PURPOSE_PASSWORD ? hint + 1 : hint}; + m_pendingContentType = {true, hint == sc(ZWP_TEXT_INPUT_V1_CONTENT_HINT_DEFAULT) ? sc(ZWP_TEXT_INPUT_V1_CONTENT_HINT_NONE) : hint, + purpose > sc(ZWP_TEXT_INPUT_V1_CONTENT_PURPOSE_PASSWORD) ? hint + 1 : hint}; }); m_resource->setSetCursorRectangle([this](CZwpTextInputV1* pMgr, int32_t x, int32_t y, int32_t width, int32_t height) { m_cursorRectangle = CBox{x, y, width, height}; }); -- cgit v1.2.3