Hi Steven, On 28 October 2014 12:25, Steven Saunderson <[email protected] > wrote:
> Hi, > I've recently added a keyboard handler (using osgGA::GUIEventHandler) to > my program and it works but the keyboard focus is lost when the program > ends and I have to click a window with the mouse to re-enable the > keyboard. My operating system is Debian ARMHF. > > The fix I've found is to change src/osgViewer/GraphicsWindowX11.cpp so its > XSetInputFocus call (there is only one) uses RevertToParent rather than > RevertToNone. > > Does this sound like a reasonable solution or can anyone see any problems > here ? I can try to supply a patch if this will kelp. > I don't see this behaviour on my KDE Linux desktop - I can run osgviewer, exit and the keyboard focus remains with the console that had the original focus. What window manager are you using? I don't have an opinions w.r.t RevertToParent change as I don't know yet what the effect across platforms will be to existing OSG applications. If it works as a better default across more X11 window managers then that would be a good thing. However, having to click for keyboard focus is hardly a major issue, there are plenty of more pressing issues I need to tackle. Robert.
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

