X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffg_main.c;h=c3bccdc39a1efe9f2e2abc5d680cc2d015cdd38d;hb=0f15fc81253f5e91c50c8e5922f981f8ee64556f;hp=99040afebaf28ef8001119e9624ed5b918c7807c;hpb=5e0c2363eddcc91af3574ea5777e686e8998e390;p=freeglut diff --git a/src/fg_main.c b/src/fg_main.c index 99040af..c3bccdc 100644 --- a/src/fg_main.c +++ b/src/fg_main.c @@ -88,6 +88,7 @@ static void fghReshapeWindow ( SFG_Window *window, int width, int height ) * the already-drawn part does not get drawn again and things look funny. * But without this we get this bad behaviour whenever we resize the * window. + * DN: Hmm.. the above sounds like a concern only in single buffered mode... */ window->State.Redisplay = GL_TRUE; @@ -120,13 +121,17 @@ void fghRedrawWindow ( SFG_Window *window ) if( window->State.NeedToResize ) { + /* Set need to resize to false before calling fghReshapeWindow, otherwise + in the case the user's reshape callback calls glutReshapeWindow, + his request would get canceled after fghReshapeWindow gets called. + */ + window->State.NeedToResize = GL_FALSE; + fghReshapeWindow( window, window->State.Width, window->State.Height ); - - window->State.NeedToResize = GL_FALSE; } INVOKE_WCB( *window, Display, ( ) );