Hello,

 

I recently converted our osg based application over to use Composite Viewer
because we need multiple Views on the same scene graph.  I'm running in to a
little snag which appears to be a bug in CompositeViewer.

 

Simple way of explaining the manifestation of the issue is that I have two
Windows and two Views (one view per window) and they both have event
handlers attached to the views which react to the
osgGA::GUIEventAdapter::RESIZE event.  Resizing works hunky dory for view 0
but it does not work correctly for view 1.  I believe the culprit is related
to these lines of code found in CompositeViewer::eventTraversal().

 

osgViewer::View* masterView = getViewWithFocus() ? getViewWithFocus() :
_views[0].get();

.

.

.

viewEventsMap[masterView].insert( viewEventsMap[masterView].end(),
gw_events.begin(), gw_events.end() );

 

The problem is that when resizing, apparently getViewWithFocus() returns
NULL (I guess because the mouse is over the window frame and not the view
within the window.  Therefore a resize event is taken out of the graphics
window queue for the 2nd window and stuck into the event queue for the 0
view (a mismatch).  The effect for me is that the when I resize one window
the HUD I have set up in the other window receives the resize event and
changes which obviously isn't what I want J.

 

This does seem to be somewhat intermittent and may be related to whether
your mouse tends to fall off the window frame towards the view or away from
the view.

 

PS I don't have a solution in hand yet.  I thought I would throw this out
there in case it's a known issue or something.

 

Thanks

-Brad

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to