Index: branches/gui/src/lib/gui/gl/glgui_button.cc
===================================================================
--- branches/gui/src/lib/gui/gl/glgui_button.cc	(revision 8666)
+++ branches/gui/src/lib/gui/gl/glgui_button.cc	(revision 8667)
@@ -79,7 +79,7 @@
     emit(clicked());
   }
-  void GLGuiButton::releasing(const Vector2D& pos)
+  void GLGuiButton::releasing(const Vector2D& pos, bool focused)
   {
-    GLGuiWidget::releasing(pos);
+    GLGuiWidget::releasing(pos, focused);
     emit(released());
   }
Index: branches/gui/src/lib/gui/gl/glgui_button.h
===================================================================
--- branches/gui/src/lib/gui/gl/glgui_button.h	(revision 8666)
+++ branches/gui/src/lib/gui/gl/glgui_button.h	(revision 8667)
@@ -48,5 +48,5 @@
 
       virtual void clicking(const Vector2D& pos);
-      virtual void releasing(const Vector2D& pos);
+      virtual void releasing(const Vector2D& pos, bool focused);
       virtual void hiding();
       virtual void showing();
Index: branches/gui/src/lib/gui/gl/glgui_checkbutton.cc
===================================================================
--- branches/gui/src/lib/gui/gl/glgui_checkbutton.cc	(revision 8666)
+++ branches/gui/src/lib/gui/gl/glgui_checkbutton.cc	(revision 8667)
@@ -78,7 +78,7 @@
 
 
-  void GLGuiCheckButton::releasing(const Vector2D& pos)
+  void GLGuiCheckButton::releasing(const Vector2D& pos, bool focused)
   {
-    GLGuiButton::releasing(pos);
+    GLGuiButton::releasing(pos, focused);
     this->toggleActiveState();
   }
Index: branches/gui/src/lib/gui/gl/glgui_checkbutton.h
===================================================================
--- branches/gui/src/lib/gui/gl/glgui_checkbutton.h	(revision 8666)
+++ branches/gui/src/lib/gui/gl/glgui_checkbutton.h	(revision 8667)
@@ -38,5 +38,5 @@
   protected:
     virtual void resize();
-    virtual void releasing(const Vector2D& pos);
+    virtual void releasing(const Vector2D& pos, bool focused);
 
   private:
Index: branches/gui/src/lib/gui/gl/glgui_handler.cc
===================================================================
--- branches/gui/src/lib/gui/gl/glgui_handler.cc	(revision 8666)
+++ branches/gui/src/lib/gui/gl/glgui_handler.cc	(revision 8667)
@@ -111,8 +111,8 @@
             Vector2D cursorPos = (this->_cursor != NULL) ? this->_cursor->getAbsCoor2D() : Vector2D(event.x, event.y);
             GLGuiWidget::mouseFocused()->select();
-            GLGuiWidget::selected()->click(cursorPos - GLGuiWidget::mouseFocused()->getAbsCoor2D());
+            GLGuiWidget::mouseFocused()->click(cursorPos - GLGuiWidget::mouseFocused()->getAbsCoor2D());
           }
         }
-        else if (GLGuiWidget::selected != NULL && !event.bPressed)
+        else if (GLGuiWidget::selected() != NULL && !event.bPressed)
         {
           if (GLGuiWidget::selected()->clickable())
@@ -162,4 +162,5 @@
       return Vector2D::nullVector();
   }
+
   Vector2D GLGuiHandler::cursorPositionRel(const GLGuiWidget* const widget) const
   {
@@ -172,17 +173,7 @@
 
 
-  void GLGuiHandler::draw()
-  {
-    //    GLGuiMainWidget::getInstance()->draw2D(E2D_LAYER_TOP);
-  }
-
-
-  void GLGuiHandler::tick(float dt)
-  {
-    // do not change if we already clicked into a Widget.
-    if (GLGuiWidget::selected() != NULL && GLGuiWidget::selected()->clicked())
-      return ;
-
-    // CHECK THE COLLISIONS.
+  void GLGuiHandler::checkFocus()
+  {
+   // CHECK THE COLLISIONS.
     const std::list<BaseObject*>* objects = ClassList::getList(CL_GLGUI_WIDGET);
 
@@ -209,3 +200,18 @@
     }
   }
+
+  void GLGuiHandler::draw()
+  {
+    //    GLGuiMainWidget::getInstance()->draw2D(E2D_LAYER_TOP);
+  }
+
+
+  void GLGuiHandler::tick(float dt)
+  {
+    // do not change if we already clicked into a Widget.
+    if (GLGuiWidget::selected() != NULL && GLGuiWidget::selected()->pushed())
+      return ;
+
+    this->checkFocus();
+  }
 }
Index: branches/gui/src/lib/gui/gl/glgui_handler.h
===================================================================
--- branches/gui/src/lib/gui/gl/glgui_handler.h	(revision 8666)
+++ branches/gui/src/lib/gui/gl/glgui_handler.h	(revision 8667)
@@ -37,4 +37,5 @@
     void deactivate();
 
+    void checkFocus();
 
     virtual void process(const Event &event);
Index: branches/gui/src/lib/gui/gl/glgui_pushbutton.cc
===================================================================
--- branches/gui/src/lib/gui/gl/glgui_pushbutton.cc	(revision 8666)
+++ branches/gui/src/lib/gui/gl/glgui_pushbutton.cc	(revision 8667)
@@ -81,8 +81,8 @@
 
 
-  void GLGuiPushButton::releasing(const Vector2D& pos)
+  void GLGuiPushButton::releasing(const Vector2D& pos, bool focused)
   {
     printf("%s released\n", this->label().c_str());
-    GLGuiButton::releasing(pos);
+    GLGuiButton::releasing(pos, focused);
   }
 
Index: branches/gui/src/lib/gui/gl/glgui_pushbutton.h
===================================================================
--- branches/gui/src/lib/gui/gl/glgui_pushbutton.h	(revision 8666)
+++ branches/gui/src/lib/gui/gl/glgui_pushbutton.h	(revision 8667)
@@ -31,8 +31,9 @@
     virtual void draw() const;
     virtual void update();
+
   protected:
     virtual void resize();
     virtual void clicking(const Vector2D& pos);
-    virtual void releasing(const Vector2D& pos);
+    virtual void releasing(const Vector2D& pos, bool focused);
     virtual void receivedFocus();
     virtual void removedFocus();
Index: branches/gui/src/lib/gui/gl/glgui_slider.cc
===================================================================
--- branches/gui/src/lib/gui/gl/glgui_slider.cc	(revision 8666)
+++ branches/gui/src/lib/gui/gl/glgui_slider.cc	(revision 8667)
@@ -193,7 +193,7 @@
   }
 
-  void GLGuiSlider::releasing(const Vector2D& pos)
-  {
-    GLGuiWidget::releasing(pos);
+  void GLGuiSlider::releasing(const Vector2D& pos, bool focused)
+  {
+    GLGuiWidget::releasing(pos, focused);
     this->grabbed = false;
   }
Index: branches/gui/src/lib/gui/gl/glgui_slider.h
===================================================================
--- branches/gui/src/lib/gui/gl/glgui_slider.h	(revision 8666)
+++ branches/gui/src/lib/gui/gl/glgui_slider.h	(revision 8667)
@@ -59,5 +59,5 @@
 
     virtual void clicking(const Vector2D& pos);
-    virtual void releasing(const Vector2D& pos);
+    virtual void releasing(const Vector2D& pos, bool focused);
     virtual void removedFocus();
 
Index: branches/gui/src/lib/gui/gl/glgui_widget.cc
===================================================================
--- branches/gui/src/lib/gui/gl/glgui_widget.cc	(revision 8666)
+++ branches/gui/src/lib/gui/gl/glgui_widget.cc	(revision 8667)
@@ -95,5 +95,5 @@
     this->_pushed = false;
     this->_state = OrxGui::Normal;
-    this->_clicked = false;
+    this->_pushed = false;
 
 
@@ -136,10 +136,37 @@
   }
 
+
+  void GLGuiWidget::setFrontColor(const Color& frontColor, bool instantaniously)
+  {
+    this->_currentStyle._foreground.setDiffuseColor(frontColor);
+    this->animateBack();
+  };
+
+
+  bool GLGuiWidget::focusOverWidget(const Vector2D& position) const
+  {
+    return (this->getAbsCoor2D().x < position.x && this->getAbsCoor2D().x + this->getSizeX2D() > position.x &&
+        this->getAbsCoor2D().y < position.y && this->getAbsCoor2D().y + this->getSizeY2D() > position.y);
+  }
+
+  bool GLGuiWidget::focusOverWidget(const GLGuiCursor* const cursor) const
+  {
+    return this->focusOverWidget(cursor->getAbsCoor2D());
+  }
+
+
+
   /** @brief gives focus to this widget */
   void GLGuiWidget::giveMouseFocus()
   {
+    if (this->_state == OrxGui::Insensitive)
+      return ;
+
     if (GLGuiWidget::mouseFocused() != NULL)
       GLGuiWidget::mouseFocused()->breakMouseFocus();
     GLGuiWidget::_mouseFocused = this;
+
+    this->switchState(OrxGui::Focused);
+
     this->receivedFocus();
   };
@@ -151,21 +178,14 @@
       GLGuiWidget::_mouseFocused = NULL;
       this->_pushed = false;
+
+      if (GLGuiWidget::_selected != this)
+        this->switchState(OrxGui::Normal);
+      else
+        this->switchState(OrxGui::Selected);
+
       this->removedFocus();
     }
   };
 
-
-  bool GLGuiWidget::focusOverWidget(const Vector2D& position) const
-  {
-    return (this->getAbsCoor2D().x < position.x && this->getAbsCoor2D().x + this->getSizeX2D() > position.x &&
-            this->getAbsCoor2D().y < position.y && this->getAbsCoor2D().y + this->getSizeY2D() > position.y);
-  }
-
-  bool GLGuiWidget::focusOverWidget(const GLGuiCursor* const cursor) const
-  {
-    return this->focusOverWidget(cursor->getAbsCoor2D());
-  }
-
-
   /**
    * @brief selects the Widget, unselecting the old one (if existing)
@@ -176,4 +196,6 @@
       GLGuiWidget::selected()->unselect();
     GLGuiWidget::_selected = this;
+
+    this->switchState(OrxGui::Selected);
   }
 
@@ -188,14 +210,11 @@
       return;
 
+    if (GLGuiWidget::_mouseFocused == this)
+      this->switchState(OrxGui::Focused);
+    else
+      this->switchState(OrxGui::Normal);
+
     GLGuiWidget::_selected = NULL;
   }
-
-
-
-  void GLGuiWidget::setFrontColor(const Color& frontColor, bool instantaniously)
-  {
-    this->_currentStyle._foreground.setDiffuseColor(frontColor);
-    this->animateBack();
-  };
 
 
@@ -220,5 +239,5 @@
     if (this->_pushed)
     {
-      this->releasing(pos);
+      this->releasing(pos, GLGuiWidget::_mouseFocused == this);
       this->_pushed = false;
     }
@@ -227,23 +246,15 @@
 
   void GLGuiWidget::clicking(const Vector2D& pos)
-  {
-    this->_clicked = true;
-    this->switchState(OrxGui::Selected);
-  }
-
-  void GLGuiWidget::releasing(const Vector2D& pos)
-  {
-    this->_clicked = false;
-    this->switchState(OrxGui::Normal);
-  }
+  {}
+
+  void GLGuiWidget::releasing(const Vector2D& pos, bool focused)
+  {}
 
   void GLGuiWidget::receivedFocus()
   {
-    this->switchState(OrxGui::Focused);
   }
 
   void GLGuiWidget::removedFocus()
   {
-    this->switchState(OrxGui::Normal);
 
   }
@@ -251,16 +262,14 @@
   void GLGuiWidget::selecting()
   {
-    this->switchState(OrxGui::Selected);
   }
 
   void GLGuiWidget::unselecting()
   {
-    this->switchState(OrxGui::Normal);
   }
 
 
   void GLGuiWidget::destroying()
-  {}
-  ;
+  {
+  }
 
 
Index: branches/gui/src/lib/gui/gl/glgui_widget.h
===================================================================
--- branches/gui/src/lib/gui/gl/glgui_widget.h	(revision 8666)
+++ branches/gui/src/lib/gui/gl/glgui_widget.h	(revision 8667)
@@ -70,5 +70,5 @@
 
     /// CLICK
-    bool clicked() { return _clicked; };
+    bool pushed() { return _pushed; };
     void click(const Vector2D& pos);
     void release(const Vector2D& pos);
@@ -255,5 +255,5 @@
     // mouse clicking
     virtual void clicking(const Vector2D& pos);
-    virtual void releasing(const Vector2D& pos);
+    virtual void releasing(const Vector2D& pos, bool focused);
     // mouse focusing
     virtual void receivedFocus();
@@ -287,5 +287,5 @@
     /// EVENTS
     OrxGui::State                  _state;
-    bool                           _clicked;
+    bool                           _pushed;
 
     bool                           _focusable;        //!< If this widget can receive focus.
@@ -293,5 +293,4 @@
     bool                           _selectable;       //!< If this widget can be selected.
 
-    bool                           _pushed;
 
 
