HI Micahel,
Are you talking about the following code in Viewer::eventTraversal()
that responds to the osgGA::GUIEventAdapter::CLOSE_WINDOW event?
for(itr = gw_events.begin();
itr != gw_events.end();
++itr)
{
osgGA::GUIEventAdapter* event = itr->get();
switch(event->getEventType())
{
case(osgGA::GUIEventAdapter::CLOSE_WINDOW):
{
bool wasThreading = areThreadsRunning();
if (wasThreading) stopThreading();
gw->close();
_currentContext = NULL;
if (wasThreading) startThreading();
break;
}
default:
break;
}
}
It would be possible to make this optional, in the same way the
EscapeSetsDone flag is used. Without any modifications to the OSG the
way to avoid the issue would be to subclass from Viewer and override
the eventTraversal() method.
Robert.
On 19 October 2012 13:36, michael kapelko <[email protected]> wrote:
> Hi.
> I've looked at the code (OSG 3.0.1) of Viewer::eventTraversal and
> noticed that it checks for CLOSE_WINDOW event and closes the window,
> so there's no way to prevent the window from closing. I've googled for
> window close prevention with no luck, too.
> Can we add something like Viewer::setSkipCloseWindowEvent to OSG?
> Thanks.
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org