summaryrefslogtreecommitdiff
path: root/src/protocols/TextInputV1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocols/TextInputV1.cpp')
-rw-r--r--src/protocols/TextInputV1.cpp4
1 files changed, 2 insertions, 2 deletions
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<CZwpTextInputV1> 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<uint32_t>(ZWP_TEXT_INPUT_V1_CONTENT_HINT_DEFAULT) ? sc<uint32_t>(ZWP_TEXT_INPUT_V1_CONTENT_HINT_NONE) : hint,
+ purpose > sc<uint32_t>(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}; });