[osg-users] set proper size to window manager at startup

Robert Osfield robert.osfield at gmail.com
Mon Apr 18 05:50:37 PDT 2016


Hi Gianni.

On 18 April 2016 at 13:48, Gianni Ambrosio <g.ambrosio+osg at gmail.com> wrote:

> I can understand you don't have time and you are not the author of
> osgWidgets. Anyway the case can be reproduced with osgviewerQt example.
> Putting one breakpoint on GLWidget::event(QEvent*) and another breakpoint
> on ViewerWidget::paintevent() method (the one that calls frame()) you can
> easily see that QEvent::Resize, QEvent::Show, QEvent::WindowActivate events
> fall into GLWidget::event() "before" the first frame() is called. So, from
> my point of view, this is not strictly a problem of osgWidgets: resize,
> show and activate evets are cleared from the event queue in every case and
> I dont' think this is correct.
>

Events before the viewer frame loop have begun should be moot for what
happens in the frame loop, these events may affect state but these should
all be accounted from by the appropriate viewer code prior to the frame
loop.  What happens prior to the frame loop is completely arbitrary and out
of the viewer's directly so it's not something it should be passing on as
events.

The problem here with osgWidget is that it's trying to use events prior to
the frame loop starting as a means of getting state about the windowing
side.  Rather than trying to second guess what the values are for a window
based on events it really should be going directly to the windows
themselves if it wants to account for their state.

Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160418/2efb6143/attachment-0002.htm>


More information about the osg-users mailing list