diff --git a/include/widget/Widget.hpp b/include/widget/Widget.hpp index 0e9ef0f2..c869a10f 100644 --- a/include/widget/Widget.hpp +++ b/include/widget/Widget.hpp @@ -299,7 +299,7 @@ struct Widget : WeakBase { /** An event prototype with a Unicode character. */ struct TextBaseEvent { /** Unicode code point of the character */ - int codepoint; + uint32_t codepoint; }; /** Occurs when a character is typed while the mouse is hovering a Widget. Recurses. diff --git a/include/widget/event.hpp b/include/widget/event.hpp index 43a037fc..9e82cdd2 100644 --- a/include/widget/event.hpp +++ b/include/widget/event.hpp @@ -148,7 +148,7 @@ struct EventState { bool handleHover(math::Vec pos, math::Vec mouseDelta); bool handleLeave(); bool handleScroll(math::Vec pos, math::Vec scrollDelta); - bool handleText(math::Vec pos, int codepoint); + bool handleText(math::Vec pos, uint32_t codepoint); bool handleKey(math::Vec pos, int key, int scancode, int action, int mods); bool handleDrop(math::Vec pos, const std::vector& paths); bool handleDirty(); diff --git a/src/widget/event.cpp b/src/widget/event.cpp index 7958cfe4..9592565d 100644 --- a/src/widget/event.cpp +++ b/src/widget/event.cpp @@ -268,7 +268,7 @@ bool EventState::handleDrop(math::Vec pos, const std::vector& paths return !!cPathDrop.target; } -bool EventState::handleText(math::Vec pos, int codepoint) { +bool EventState::handleText(math::Vec pos, uint32_t codepoint) { if (selectedWidget) { // Dispatch SelectTextEvent EventContext cSelectText;