Hello Franz,

I really did not intend to criticize the equivalent X11 fix, only to point out the differences and why I did it differently. That's also why I pointed out that it could probably all be done in the base class (even with those differences, the fix on Win32 was very similar to the one on X11). The subclasses could just call the base class's keyDown, keyUp and gotFocus handlers when appropriate, and the base class would handle the behavior in a platform-independent way, using the osgGA::GUIEventAdapter keycodes.

Never tried that. Will do once there is an osgkeyboard version
with two windows.  :-)

When you start the example on a machine with two monitors, it comes up by default on both monitors, with one GraphicsWindowWin32 instance for each. If I click in the left monitor (so the focus is on the left-side GraphicsWindowWin32), then press alt-tab to switch to another application and then click on the osgkeyboard example but on the *right* monitor (so the focus returns to the right-hand GraphicsWindowWin32), then the alt key is still stuck (because the right monitor has a different GraphicsWindowWin32 instance, so the key state for alt was not pressed, and thus it won't call keyRelease() for it).

And before you ask why I don't just call keyRelease() for all keys, I can't, because then the KEYUP event for Esc would cause the example to exit. I could call keyRelease for all keys except Esc, that would work. If you think that's reasonable I'll do that instead.

Thanks for your comments,

J-S
--
______________________________________________________
Jean-Sebastien Guay    [EMAIL PROTECTED]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to