diff --git a/src/osgWidget/Input.cpp b/src/osgWidget/Input.cpp index 11cdc75cd..ceb62d6c4 100644 --- a/src/osgWidget/Input.cpp +++ b/src/osgWidget/Input.cpp @@ -113,7 +113,7 @@ void Input::positioned() { point_type xoffset = _index > 0 ? _offsets[_index - 1] : 0.0f; - _cursor->setOrigin(x + xoffset + 1.0f, y - _cursor->getHeight() + 1.0f); + _cursor->setOrigin(x + xoffset + 1.0f, y + 1.0f); _cursor->setZ(_calculateZ(LAYER_MIDDLE)); } diff --git a/src/osgWidget/WindowManager.cpp b/src/osgWidget/WindowManager.cpp index 1a3f1db45..334fce210 100644 --- a/src/osgWidget/WindowManager.cpp +++ b/src/osgWidget/WindowManager.cpp @@ -248,9 +248,10 @@ void WindowManager::childInserted(unsigned int i) { _styleManager->applyStyles(window); } -void WindowManager::childRemoved(unsigned int start, unsigned int end) { - while(start < end) { - Window* window = getByIndex(start); +void WindowManager::childRemoved(unsigned int start, unsigned int numChildren) { + for (unsigned int i = start; i < start+numChildren; i++) + { + Window* window = getByIndex(i); if(!window) continue; @@ -259,8 +260,6 @@ void WindowManager::childRemoved(unsigned int start, unsigned int end) { window->unmanaged(this); } - - start++; } }