I'd like to perform some custom action when the window frame's close action is triggered. The various native windows send an osgGA::GUIEventAdapter::CLOSE_WINDOW but this is handled directly by osgViewer::Viewer::eventTraversal. (Before any callbacks, etc, as far as I can see)
I can override eventTraversal() of course .. but since the events are retrieved from the GraphicsWindow inside the base version, I'd have to duplicate the code to take events, remove the close event, add all the other events *back*, and then call the base version of Viewer::eventTraversal.
That seems a pretty fragile way to go about it, is there a smarter solution I'm missing?
Kind regards,
James