Improved handling of window input ranges for single window apps

This commit is contained in:
Robert Osfield
2006-12-27 20:23:34 +00:00
parent c8957b58c8
commit b2a0b50a5a
2 changed files with 14 additions and 2 deletions

View File

@@ -105,12 +105,14 @@ void View::setUpViewAcrossAllScreens()
if (gw)
{
osg::notify(osg::INFO)<<" GraphicsWindow has been created successfully."<<std::endl;
gw->getEventQueue()->getCurrentEventState()->setWindowRectangle(0, 0, width, height );
}
else
{
osg::notify(osg::NOTICE)<<" GraphicsWindow has not been created successfully."<<std::endl;
}
_camera->setViewport(new osg::Viewport(0, 0, width, height));
}
else
@@ -147,6 +149,7 @@ void View::setUpViewAcrossAllScreens()
{
osg::notify(osg::INFO)<<" GraphicsWindow has been created successfully."<<gw<<std::endl;
gw->getEventQueue()->getCurrentEventState()->setWindowRectangle(0, 0, width, height );
gw->getEventQueue()->setUseFixedMouseInputRange(true);
gw->getEventQueue()->getCurrentEventState()->setInputRange(inputRangeMinX, inputRangeMinY, inputRangeMinX+float(width),inputRangeMinY+float(height) );
inputRangeMinX += float(width);