[osg-submissions] GraphicsWindowWin32 fix to prevent resizing window height to zero
Adrian Egli
3dhelp at gmail.com
Sat Dec 8 02:42:52 PST 2007
Hi
i came up with short review :
Quick fix to this is relax condition:
> if (clientRect.bottom==0 || clientRect.right==0)
make it not more sense to prevent either bottom == 0 or/and right == 0 size
if ( clientRect.bottom==0 ) ...
if ( clientRect.right==0 ) ...
adegli
2007/12/6, Robert Osfield <robert.osfield at gmail.com>:
>
> Thanks Jari, fix now merged and checked into SVN.
>
> On Oct 9, 2007 11:20 AM, Hautio Jari <Jari.Hautio at vtt.fi> wrote:
> > Hi!
> >
> > Current version of GraphicsWindowWin32 allows resize to zero height
> > window. This breaks rendering in for example MFC SDI applications and in
> > MFC MDI applications if user resizes the window so that client area has
> > zero height. Current safeguard for minimized window:
> >
> > LRESULT GraphicsWindowWin32::handleNativeWindowingEvent( HWND hwnd, UINT
> > uMsg, WPARAM wParam, LPARAM lParam )
> > ...
> > /////////////////
> > case WM_MOVE :
> > case WM_SIZE :
> > /////////////////
> > ...
> > if (clientRect.bottom==0 && clientRect.right==0)
> > ...
> >
> > does not cover this situation. In these situations clientRect.bottom = 0
> > and clientRect.right > 0.
> >
> > Quick fix to this is relax condition:
> > if (clientRect.bottom==0 || clientRect.right==0)
> >
> > Modified file is attached.
> >
> > Tested with osgviewerMFC from 2.2.0 release (Windows XP sp2)
> >
> > Before fix:
> > - execute from command line osgviewerMFC.exe cow.osg.
> > - the cow is rendered nicely.
> > - resize window to zero height by dragging from bottom border upwards.
> > - resize window back to original height
> > - just blue screen, no cow
> >
> > After fix:
> > - execute from command line osgviewerMFC.exe cow.osg.
> > - the cow is rendered nicely.
> > - resize window to zero height by dragging from bottom border upwards.
> > - resize window back to original height
> > - the cow is where it is supposed to be.
> >
> > Cheers,
> >
> > Jari Hautio
> >
> > _______________________________________________
> > osg-submissions mailing list
> > osg-submissions at lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
> >
> >
> _______________________________________________
> osg-submissions mailing list
> osg-submissions at lists.openscenegraph.org
>
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
--
********************************************
Adrian Egli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20071208/fd0c33f4/attachment.html
More information about the osg-submissions
mailing list