summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-23 19:12:36 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-24 21:08:16 +0300
commit270d6d2753473955a2b691a934eb2e550d13ebc3 (patch)
tree2ba55bab0c21b1775bfcd85e80d24cbfbbe652e9 /src/gui/gui.cpp
parentc7f5d0a71d7318ccc4c3f28ab90d688a1a0868b3 (diff)
downloadmv-270d6d2753473955a2b691a934eb2e550d13ebc3.tar.gz
mv-270d6d2753473955a2b691a934eb2e550d13ebc3.tar.bz2
mv-270d6d2753473955a2b691a934eb2e550d13ebc3.tar.xz
mv-270d6d2753473955a2b691a934eb2e550d13ebc3.zip
fix gui text input in SDL2.
copy/paste broken for SDL2.
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index ba7a0de06..8068ffad7 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -376,6 +376,9 @@ bool Gui::handleKeyInput2()
keyInput.getType(), keyInput.isNumericPad(),
keyInput.getActionId(), keyInput.getKey());
+ if (!keyInput.getText().empty())
+ keyEventToGlobalKeyListeners.setText(keyInput.getText());
+
distributeKeyEventToGlobalKeyListeners(
keyEventToGlobalKeyListeners);
@@ -398,6 +401,8 @@ bool Gui::handleKeyInput2()
mShiftPressed, mControlPressed, mAltPressed, mMetaPressed,
keyInput.getType(), keyInput.isNumericPad(),
keyInput.getActionId(), keyInput.getKey());
+ if (!keyInput.getText().empty())
+ keyEvent.setText(keyInput.getText());
if (!mFocusHandler->getFocused()->isFocusable())
mFocusHandler->focusNone();