Index: code/trunk/src/orxonox/gamestates/GSGraphics.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSGraphics.cc	(revision 1854)
+++ code/trunk/src/orxonox/gamestates/GSGraphics.cc	(revision 1878)
@@ -140,4 +140,7 @@
         using namespace Ogre;
 
+        // remove our WindowEventListener first to avoid bad calls in the procedures
+        Ogre::WindowEventUtilities::removeWindowEventListener(this->renderWindow_, this);
+
         delete this->guiManager_;
 
@@ -149,6 +152,4 @@
 
         // destroy render window
-        this->renderWindow_->removeAllViewports();
-        this->renderWindow_->removeAllListeners();
         RenderSystem* renderer = this->ogreRoot_->getRenderSystem();
         renderer->destroyRenderWindow("Orxonox");
@@ -360,8 +361,11 @@
         The render window it occured in
     */
-    void GSGraphics::windowFocusChanged(Ogre::RenderWindow *rw)
+    void GSGraphics::windowFocusChange(Ogre::RenderWindow *rw)
     {
         for (ObjectList<orxonox::WindowEventListener>::iterator it = ObjectList<orxonox::WindowEventListener>::begin(); it; ++it)
             it->windowFocusChanged();
+
+        // instruct InputManager to clear the buffers (core library so we cannot use the interface)
+        InputManager::getInstance().clearBuffers();
     }
 
Index: code/trunk/src/orxonox/gamestates/GSGraphics.h
===================================================================
--- code/trunk/src/orxonox/gamestates/GSGraphics.h	(revision 1854)
+++ code/trunk/src/orxonox/gamestates/GSGraphics.h	(revision 1878)
@@ -65,5 +65,5 @@
         void windowMoved       (Ogre::RenderWindow* rw);
         void windowResized     (Ogre::RenderWindow* rw);
-        void windowFocusChanged(Ogre::RenderWindow* rw);
+        void windowFocusChange (Ogre::RenderWindow* rw);
         void windowClosed      (Ogre::RenderWindow* rw);
 
Index: code/trunk/src/orxonox/gui/GUIManager.cc
===================================================================
--- code/trunk/src/orxonox/gui/GUIManager.cc	(revision 1854)
+++ code/trunk/src/orxonox/gui/GUIManager.cc	(revision 1878)
@@ -156,5 +156,5 @@
                 SimpleInputState* state = InputManager::getInstance().createInputState<SimpleInputState>("gui", 30);
                 state->setHandler(this);
-                state->setJoyStickHandler(new EmptyHandler());
+                state->setJoyStickHandler(&InputManager::EMPTY_HANDLER);
 
                 // load the background scene
Index: code/trunk/src/orxonox/overlays/console/InGameConsole.cc
===================================================================
--- code/trunk/src/orxonox/overlays/console/InGameConsole.cc	(revision 1854)
+++ code/trunk/src/orxonox/overlays/console/InGameConsole.cc	(revision 1878)
@@ -70,4 +70,5 @@
         , consoleOverlayBorder_(0)
         , consoleOverlayTextAreas_(0)
+        , inputState_(0)
     {
         RegisterObject(InGameConsole);
@@ -143,4 +144,25 @@
         SetConfigValue(noiseSize_, 1.0f);
         SetConfigValue(cursorSymbol_, '|');
+        SetConfigValue(bHidesAllInput_, false).callback(this, &InGameConsole::bHidesAllInputChanged);
+    }
+
+    /**
+        @brief Called whenever bHidesAllInput_ changes.
+    */
+    void InGameConsole::bHidesAllInputChanged()
+    {
+        if (inputState_)
+        {
+            if (bHidesAllInput_)
+            {
+                inputState_->setMouseHandler(&InputManager::EMPTY_HANDLER);
+                inputState_->setJoyStickHandler(&InputManager::EMPTY_HANDLER);
+            }
+            else
+            {
+                inputState_->setMouseHandler(0);
+                inputState_->setJoyStickHandler(0);
+            }
+        }
     }
 
@@ -151,6 +173,7 @@
     {
         // create the corresponding input state
-        InputManager::getInstance().createInputState<SimpleInputState>("console", 40)
-            ->setKeyHandler(Shell::getInstance().getInputBuffer());
+        inputState_ = InputManager::getInstance().createInputState<SimpleInputState>("console", 40);
+        inputState_->setKeyHandler(Shell::getInstance().getInputBuffer());
+        bHidesAllInputChanged();
 
         // create overlay and elements
Index: code/trunk/src/orxonox/overlays/console/InGameConsole.h
===================================================================
--- code/trunk/src/orxonox/overlays/console/InGameConsole.h	(revision 1854)
+++ code/trunk/src/orxonox/overlays/console/InGameConsole.h	(revision 1878)
@@ -81,4 +81,7 @@
         void windowResized(int newWidth, int newHeight);
 
+        // config value related
+        void bHidesAllInputChanged();
+
         static Ogre::UTFString convert2UTF(std::string s);
 
@@ -102,4 +105,7 @@
         Ogre::TextAreaOverlayElement** consoleOverlayTextAreas_;
 
+        // input related
+        SimpleInputState* inputState_;
+
         // config values
         float relativeWidth;
@@ -109,4 +115,5 @@
         float noiseSize_;
         char cursorSymbol_;
+        bool bHidesAllInput_;
 
         static InGameConsole* singletonRef_s;
