diff --git a/source/Irrlicht/CGUITabControl.cpp b/source/Irrlicht/CGUITabControl.cpp index 79d73ab0..a368df4a 100644 --- a/source/Irrlicht/CGUITabControl.cpp +++ b/source/Irrlicht/CGUITabControl.cpp @@ -347,9 +347,9 @@ bool CGUITabControl::OnEvent(const SEvent& event) case EET_MOUSE_INPUT_EVENT: switch(event.MouseInput.Event) { - //case EMIE_LMOUSE_PRESSED_DOWN: - // Environment->setFocus(this); - // return true; + case EMIE_LMOUSE_PRESSED_DOWN: + // todo: dragging tabs around + return true; case EMIE_LMOUSE_LEFT_UP: if (selectTab(core::position2d(event.MouseInput.X, event.MouseInput.Y))) return true; diff --git a/source/Irrlicht/CGUIWindow.cpp b/source/Irrlicht/CGUIWindow.cpp index e479c67c..307d77e2 100644 --- a/source/Irrlicht/CGUIWindow.cpp +++ b/source/Irrlicht/CGUIWindow.cpp @@ -119,10 +119,8 @@ bool CGUIWindow::OnEvent(const SEvent& event) else if (event.GUIEvent.EventType == EGET_ELEMENT_FOCUSED) { - if (event.GUIEvent.Caller == this && Parent) - { + if (isMyChild(event.GUIEvent.Caller) && Parent) Parent->bringToFront(this); - } } else if (event.GUIEvent.EventType == EGET_BUTTON_CLICKED) @@ -140,9 +138,8 @@ bool CGUIWindow::OnEvent(const SEvent& event) // if the event was not absorbed if (!Parent->OnEvent(e)) - { remove(); - } + return true; }