Hi J-S -- I get a compile warning with your change...
1>GraphicsWindowWin32.cpp
1>c:\osgdev\osg\src\osgviewer\graphicswindowwin32.cpp(2317) : warning C4700:
uninitialized local variable 'result' used
Looks like the 'result' var only gets initialized in the WM_NCHITTEST case,
so is potentially uninitialized when it's returned at line 2317:
if (windowProcCalled)
!! return result;
else
return _windowProcedure==0 ? ::DefWindowProc(hwnd, uMsg, wParam,
lParam) :
Can you please double-check this code before I commit it? Thanks.
-Paul
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Jean-Sébastien Guay
> Sent: Thursday, July 31, 2008 8:08 AM
> To: OpenSceneGraph Submissions
> Subject: Re: [osg-submissions] [osg-users] Win32 keyboard bug
>
> Hello all,
>
> > Ah, so you release *all* keys that OSG thinks are pressed?
> You don't
> > check whether they're actually pressed or not?
> >
> > That would work! I'll go do that and update my submission.
>
> So after discussion with Melchior Franz, I *finally*
> understood what the existing solution in GraphicsWindowX11
> did, and did the equivalent thing in GraphicsWindowWin32.
>
> When the window loses focus, keys that OSG currently thinks
> are pressed are released. Nothing special needs to be done
> when focus comes back to the window, as discussed. It works
> fine for me, even in multi-window setups.
>
> The zip still contains both changes (the keyboard stuck keys
> fix and the window resize cursors change), made on SVN as of
> today. Please remember to credit the second fix to my
> colleague Daniel Olivier ([EMAIL PROTECTED]).
>
> It would be nice if this could be applied to the 2.6 branch,
> but it's up to you. It fixes two long-standing known issues
> (though non-critical, so I'd understand if you really want to
> push it until after 2.6).
>
> Thanks,
>
> 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