I have spent time looking into how the CompositeViewer::eventTraversal() handles event focus and different types of events and decided the best way to improve the event handling behaviour is to treat different classes of events in different ways, the enum I've used to should hopefully be self explanatory:
enum EventClassification { EVENT_FOR_VIEW_ASSOCIATED_WITH_FOCUS, EVENT_FOR_VIEWS_ASSOCIATED_WITH_WINDOW, EVENT_FOR_ALL_VIEWS }; This EvenClassification is then made for each event, so things like RESIZE and CLOSE_WINDOW got to EVENT_FOR_VIEWS_ASSOCIATED_WITH_WINDOW, while QUIT and USER go to EVENT_FOR_ALL_VIEWS and finally all the rest of the events get assigned EVENT_FOR_VIEW_ASSOCIATED_WITH_FOCUS. Code then send the event to one of more views depending upon this classification. The new code is checked in to OSG master: https://github.com/openscenegraph/OpenSceneGraph/commit/e17f1c4e317a23dca5e36959c9a1059dab6dd733 With this set of changes the osgWidget test program in this thread now works as expected whether moving the mouse directly to the title bar to resize without gaining focus, and with doing the same with getting focus by moving the mouse over the 3d region of the window. I welcome testing out in the community of these changes. If things all look good I'll look into merging these improvements to the OSG-3.4 and OSG-3.2 branches. Robert. _______________________________________________ osg-submissions mailing list osg-submissions@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org