Robert,

I agree with you, event focus needs more scrutiny.

The easiest way to reproduce the bug that I was seeing regarding resize is
via the attached simple sample program.  I've included the project, etc. for
Visual Studio but since there is only one source file you shouldn't have
much trouble compiling on Linux.

To produce the bug, click on the view in window one (that view receives
"focus") then resize the window frame of window two without mousing over the
view within window two.  When you do the resize you should see the HUD in
view1/window1 resize (it shouldn't!!)

Thanks
-Brad

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
Robert Osfield
Sent: Tuesday, May 03, 2011 3:57 AM
To: OpenSceneGraph Submissions
Subject: Re: [osg-submissions] CompositeViewer bug

Hi Brad,

I've reviewed your changes and they make me feel like I really need to spend
some time rethinking the management of the event focus.  Neither your
changes or the original feel like clean solution.

Could you please outline how I can reproduce the bugs that you've seen then
I can think about these.  I must admit I'm a bit cold on the whole topic of
CompositeViewer and event focus so will need a little time to get back up to
speed and make a good decision about how to go forward - knowing how to
recreate the problems will help ramp up quicker.

Cheers,
Robert.

On Tue, May 3, 2011 at 12:06 AM, Brad Huber <[email protected]> wrote:
> Actually the fix needs be more like what is attached.  Please 
> disregard the attachments to my first email about this same bug.
>
>
>
> In addition to the bug description below, when a RESIZE event is 
> received CompositeViewer currently does setCameraWithFocus(0); and 
> does not change masterView (it should!!).  This fix addresses that.
>
>
>
> I look forward to hearing if there is a better fix for this issue…
>
>
>
> Thanks
>
> -Brad
>
>
>
> From: [email protected]
> [mailto:[email protected]] On Behalf Of 
> Brad Huber
> Sent: Monday, May 02, 2011 3:24 PM
> To: [email protected]
> Subject: [osg-submissions] CompositeViewer bug
>
>
>
> I’ve attached  a fix to a bug I discovered in CompositeViewer which 
> allowed some GUI events to get sent to the wrong view.  The attachment 
> is duplicated in both .zip and .gz forms for convenience.  This 
> behavior was observed on a Windows machine and I did not test on any 
> other OSes but I suspect it does exist on the other OSes as well.
>
>
>
> I apologize if my submission is not quite in the right form.  I tried 
> to look online for a writeup about the submission protocol but the osg 
> website was apparently down.
>
>
>
> A description of the bug:
>
> When using composite viewer, if getViewWithFocus() was NULL then 
> masterView would get set to _views[0].  In the case where you resize 
> the window frame (and you have not moused over any views within that 
> window) then the resize event would mistakenly get sent to _views[0] 
> which was in a different window altogether.  I address this by setting 
> masterView to the first view found within the graphics window instead.
>
>
>
> PS I don’t know if this is the best/correct fix, or if something else 
> should be done instead.  It seems to fix the problem for me.
>
>
>
> Thanks
>
> -Brad
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscene
> graph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.
org

Attachment: CompositeViewer_Playground.zi_
Description: Binary data

_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to