Bingo! I just reviewed a couple of old checkouts of Crystal Space I have, and it looks like some one "cleaned up" (i.e. broke) the plugin.
I orginally had a function: void csGLCanvas::OnEnterWindow( wxMouseEvent& WXUNUSED(event) ) { SetFocus(); } Which fixes precisely the keyboard focus problem by giving it "focus on enter" behavior. Someone changed it to: void csGLCanvas::OnEnterWindow( wxMouseEvent& WXUNUSED(event) ) { csRef<iEventNameRegistry> enr = CS_QUERY_REGISTRY (g2d->object_reg, iEventNameRegistry); g2d->EventOutlet->Broadcast(csevFocusGained(enr)); } The problem is, this tells Crystal Space has focus, but doesn't change the *system* focus, which was the whole purpose of calling SetFocus(). Someone misread the purpose of the method and... broke it. So, try re-adding SetFocus() to the csGLCanvas::OnEnterWindow() method (in CS/plugins/video/canvas/wxgl/GLWXDriver2D.cpp). On Sun, Mar 11, 2007 at 11:50:22AM -0700, Ken Taylor wrote: > So some further investigation has revealed that the problem I've been having > with the wxglcanvas is an issue of keyboard focus. For some reason, the > canvas never gets the keyboard focus in ter'angreal when using my compiled > wxgl.dll. Same deal with wxtest (there's a weird 1x1 window that has the > focus by default. If I remove that window, so the canvas is the only window, > and therefore must have the focus, everything works fine!). The > wxwidgets/samples/opengl/cube application works fine, but it's the only > window as well, so I can't tell yet if it's a wxwidgets or a CS issue. > > Using Spy++ on windows, it looks like the windows installer-packaged version > of Ter'Angreal (0.23) Sends WM_SETFOCUS messages to the canvas whenever > there's any mouse event over it. This is evidenced by the fact that the > cursor disappears from the chat box if the focus was there previously. In > the version I compile, no such messages get sent to the canvas ever, and the > focus stays where it was. No setfocus messages get sent in the case of > wxtest or the cube sample program, either... > > So what I conclude from this is that -- for some reason -- there was some > code in the wxgl.dll included with the binary installation package for > windows that automatically sets the focus to the canvas on mouse events (or > there's some windows property on the canvas or one of its parents that > causes this to happen -- but as far as I could tell the windows properties > were identical). Perhaps an older version of wxwidgets did this > automatically, and they removed it? Perhaps the solution is simply to manage > the focus explicitly in Ter'angreal? > > -Ken > > > _______________________________________________ > vos-d mailing list > vos-d@interreality.org > http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d -- [ Peter Amstutz ][ [EMAIL PROTECTED] ][ [EMAIL PROTECTED] ] [Lead Programmer][Interreality Project][Virtual Reality for the Internet] [ VOS: Next Generation Internet Communication][ http://interreality.org ] [ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ]
signature.asc
Description: Digital signature
_______________________________________________ vos-d mailing list vos-d@interreality.org http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d