Index: /code/trunk/src/libraries/core/GUIManager.cc
===================================================================
--- /code/trunk/src/libraries/core/GUIManager.cc	(revision 7873)
+++ /code/trunk/src/libraries/core/GUIManager.cc	(revision 7874)
@@ -393,4 +393,12 @@
 
     /**
+        @brief Indicates that the mouse left the application's window.
+    */
+    void GUIManager::mouseLeft()
+    {
+        this->protectedCall(boost::bind(&CEGUI::System::injectMouseLeaves, _1));
+    }
+
+    /**
     @brief
         converts mouse event code to CEGUI event code
@@ -505,3 +513,12 @@
         this->guiRenderer_->setDisplaySize(CEGUI::Size(newWidth, newHeight));
     }
+
+    /**
+        @brief Notify CEGUI if the windows loses the focus (stops higlight of menu items, etc).
+    */
+    void GUIManager::windowFocusChanged(bool bFocus)
+    {
+        if (!bFocus)
+            this->mouseLeft();
+    }
 }
Index: /code/trunk/src/libraries/core/GUIManager.h
===================================================================
--- /code/trunk/src/libraries/core/GUIManager.h	(revision 7873)
+++ /code/trunk/src/libraries/core/GUIManager.h	(revision 7874)
@@ -132,7 +132,9 @@
         void mouseMoved    (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize);
         void mouseScrolled (int abs, int rel);
+        void mouseLeft     ();
 
         // window event handler
         virtual void windowResized(unsigned int newWidth, unsigned int newHeight);
+        virtual void windowFocusChanged(bool bFocus);
 
         scoped_ptr<CEGUI::OgreCEGUIRenderer> guiRenderer_;      //!< CEGUI's interface to the Ogre Engine
Index: /code/trunk/src/libraries/core/GraphicsManager.cc
===================================================================
--- /code/trunk/src/libraries/core/GraphicsManager.cc	(revision 7873)
+++ /code/trunk/src/libraries/core/GraphicsManager.cc	(revision 7874)
@@ -75,5 +75,5 @@
             { orxonox::WindowEventListener::resizeWindow(rw->getWidth(), rw->getHeight()); }
         void windowFocusChange (Ogre::RenderWindow* rw)
-            { orxonox::WindowEventListener::changeWindowFocus(); }
+            { orxonox::WindowEventListener::changeWindowFocus(rw->isActive()); }
         void windowClosed      (Ogre::RenderWindow* rw)
             { orxonox::Game::getInstance().stop(); }
Index: /code/trunk/src/libraries/core/WindowEventListener.cc
===================================================================
--- /code/trunk/src/libraries/core/WindowEventListener.cc	(revision 7873)
+++ /code/trunk/src/libraries/core/WindowEventListener.cc	(revision 7874)
@@ -57,8 +57,8 @@
 
     //! Calls all registered objects
-    /*static*/ void WindowEventListener::changeWindowFocus()
+    /*static*/ void WindowEventListener::changeWindowFocus(bool bFocus)
     {
         for (ObjectList<WindowEventListener>::iterator it = ObjectList<WindowEventListener>::begin(); it; ++it)
-            it->windowFocusChanged();
+            it->windowFocusChanged(bFocus);
     }
 }
Index: /code/trunk/src/libraries/core/WindowEventListener.h
===================================================================
--- /code/trunk/src/libraries/core/WindowEventListener.h	(revision 7873)
+++ /code/trunk/src/libraries/core/WindowEventListener.h	(revision 7874)
@@ -62,9 +62,9 @@
 
             //! Window has lost/gained focus
-            virtual void windowFocusChanged() { }
+            virtual void windowFocusChanged(bool bFocus) { }
 
             static void moveWindow();
             static void resizeWindow(unsigned int newWidth, unsigned int newHeight);
-            static void changeWindowFocus();
+            static void changeWindowFocus(bool bFocus);
 
             //! Static variable that holds the latest distributed information
Index: /code/trunk/src/libraries/core/input/InputManager.cc
===================================================================
--- /code/trunk/src/libraries/core/input/InputManager.cc	(revision 7873)
+++ /code/trunk/src/libraries/core/input/InputManager.cc	(revision 7874)
@@ -496,5 +496,5 @@
 
     //! Gets called by WindowEventListener upon focus change --> clear buffers
-    void InputManager::windowFocusChanged()
+    void InputManager::windowFocusChanged(bool bFocus)
     {
         this->clearBuffers();
Index: /code/trunk/src/libraries/core/input/InputManager.h
===================================================================
--- /code/trunk/src/libraries/core/input/InputManager.h	(revision 7873)
+++ /code/trunk/src/libraries/core/input/InputManager.h	(revision 7874)
@@ -202,5 +202,5 @@
 
         // From WindowEventListener
-        void windowFocusChanged();
+        void windowFocusChanged(bool bFocus);
 
     private: // variables
