[osg-users] Clarification on: grabFocus and grabFocusIfPointerInWindow

Mario Valle mvalle at cscs.ch
Sun Sep 9 22:22:58 PDT 2007


Is it true that the focus to a Viewer is given only during realize(), 
set full screen and change resolution operations?
 From the source seems so.

But if I have a GUI that contains various widgets plus a Viewer (that 
uses a GL canvas widget) and I click on a GUI widget then the focus does 
not return automatically to the viewer when I move the mouse to be 
inside the Viewer.

That means that I should add a call to grabFocus inside my Viewer 
OnButtonDown processing or I should add a call to 
grabFocusIfPointerInWindow to my OnIdle processing. Is this true or I'm 
overlooking something more obvious?
To be concrete: I'm developing a tool with wxWidgets building on top of 
the provided osgviewerWX example.

Thanks for your time!
                                           mario

-- 
Ing. Mario Valle
Visualization Group                              | http://www.cscs.ch/~mvalle
Swiss National Supercomputing Centre (CSCS)      | Tel:  +41 (91) 610.82.60
v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax:  +41 (91) 610.82.82




More information about the osg-users mailing list