From 9aa0f34c4a6205590d7dbba6f0a65f91a4897ed0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 1 Oct 2014 21:23:36 +0300 Subject: Fix input fields detection for input rules. --- src/input/inputmanager.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp index 4405b0c0a..83e01d0ba 100644 --- a/src/input/inputmanager.cpp +++ b/src/input/inputmanager.cpp @@ -38,6 +38,7 @@ #include "gui/sdlinput.h" #include "gui/widgets/selldialog.h" +#include "gui/widgets/textfield.h" #include "gui/widgets/tabs/setup_input.h" @@ -657,7 +658,23 @@ void InputManager::updateConditionMask() !InventoryWindow::isAnyInputFocused() && (!tradeWindow || !tradeWindow->isInpupFocused())) { - mMask |= InputCondition::NOINPUT; + if (gui) + { + FocusHandler *const focus = gui->getFocusHandler(); + if (focus) + { + if (!dynamic_cast(focus->getFocused())) + mMask |= InputCondition::NOINPUT; + } + else + { + mMask |= InputCondition::NOINPUT; + } + } + else + { + mMask |= InputCondition::NOINPUT; + } } if (!BuyDialog::isActive() && !SellDialog::isActive()) -- cgit v1.2.3-70-g09d2