From a9759c3f33c191e49a4b0775d5a4c8e0086f366f Mon Sep 17 00:00:00 2001 From: Roman Melnik Date: Mon, 19 Mar 2012 21:01:00 +0200 Subject: [PATCH 1/2] Fix bug #192: Remove the focus from the console when console is closed (set current keyFocusWidget to nullptr) --- apps/openmw/mwgui/console.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/openmw/mwgui/console.cpp b/apps/openmw/mwgui/console.cpp index 3fd6e7892..c16bbf084 100644 --- a/apps/openmw/mwgui/console.cpp +++ b/apps/openmw/mwgui/console.cpp @@ -139,6 +139,9 @@ namespace MWGui void Console::disable() { setVisible(false); + // Remove keyboard focus from the console input whenever the + // console is turned off + MyGUI::InputManager::getInstance().setKeyFocusWidget(nullptr); } void Console::setFont(const std::string &fntName) From 88979577dbb9c811212182678b22fbd9f10c1194 Mon Sep 17 00:00:00 2001 From: Roman Melnik Date: Mon, 19 Mar 2012 21:45:53 +0200 Subject: [PATCH 2/2] Change 'nullptr' to 'NULL' (after fixing bug#192 in previous commit) --- apps/openmw/mwgui/console.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwgui/console.cpp b/apps/openmw/mwgui/console.cpp index c16bbf084..0a5197c60 100644 --- a/apps/openmw/mwgui/console.cpp +++ b/apps/openmw/mwgui/console.cpp @@ -141,7 +141,7 @@ namespace MWGui setVisible(false); // Remove keyboard focus from the console input whenever the // console is turned off - MyGUI::InputManager::getInstance().setKeyFocusWidget(nullptr); + MyGUI::InputManager::getInstance().setKeyFocusWidget(NULL); } void Console::setFont(const std::string &fntName)