* Jean-Sébastien Guay -- Wednesday 30 July 2008: > * the second is that the state kept in GraphicsWindowWin32 is kept in a > map instead of a char array. I don't think it will be significantly > slower,
This wasn't to make it faster, but X11 is returning both key states and modifier keys in a char[32], and we need functions to deal with that, anyway. So we can as well keep using that. Just copying that over to a map<> for the sake of it didn't seem desirable. But if someone wants to change that -- I can live with it. > * the third is that the code iterates through the keyboard mappings in > the s_win32KeyboardMap variable instead of iterating from 8 to 256 > (fixed range). I think that's safer and more future-proof. The X11 spec only says that the values are returned in a char[32] and that the first byte is used for "internal purposes". There aren't any symbols defined for that. I could/should have introduced some. Feel free to do it. But it should be made clear that changing the constants is a Bad Idea. > There's one remaining problem, but I suspect this happens in > GraphicsWindowX11 as well. Since the key state is kept in the > GraphicsWindowWin32 instance, if the app has two windows and focus > leaves one window and comes back to the other, keys could still be stuck > as before. Never tried that. Will do once there is an osgkeyboard version with two windows. :-) m. _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
