Fixed panning bug, when using RUN_ON_DEMAND, that resulted in the camera being thrown off towards infinity.
The solution for to refactor the way that events are checked so I add a bool return type to checkEvents() method across osgViewer::GraphcisWindow, osgGA::Devive and osgViewer::Viewer/CompositeViewer classes
This commit is contained in:
@@ -1197,9 +1197,9 @@ void GraphicsWindowX11::swapBuffersImplementation()
|
||||
}
|
||||
}
|
||||
|
||||
void GraphicsWindowX11::checkEvents()
|
||||
bool GraphicsWindowX11::checkEvents()
|
||||
{
|
||||
if (!_realized) return;
|
||||
if (!_realized) return false;
|
||||
|
||||
Display* display = _eventDisplay;
|
||||
|
||||
@@ -1564,6 +1564,8 @@ void GraphicsWindowX11::checkEvents()
|
||||
requestRedraw();
|
||||
}
|
||||
}
|
||||
|
||||
return !(getEventQueue()->empty());
|
||||
}
|
||||
|
||||
void GraphicsWindowX11::grabFocus()
|
||||
|
||||
Reference in New Issue
Block a user