X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_main.c;h=8ade92bc70c81cd28f8b1e12ce4c4405825b172c;hb=ce2e5aba172eb85cda2b4f047bdcf9f54d019fd7;hp=c6d9c73bf273b15e45ab54950afef936ad451b89;hpb=9aef0d00666699035d13b4889b9b2ddcbafb9bba;p=freeglut diff --git a/src/freeglut_main.c b/src/freeglut_main.c index c6d9c73..8ade92b 100644 --- a/src/freeglut_main.c +++ b/src/freeglut_main.c @@ -413,7 +413,7 @@ static int fghHaveJoystick( void ) } static void fghHavePendingRedisplaysCallback( SFG_Window* w, SFG_Enumerator* e) { - if( w->State.Redisplay ) + if( w->State.Redisplay && w->State.Visible ) { e->found = GL_TRUE; e->data = w; @@ -1085,7 +1085,6 @@ void FGAPIENTRY glutMainLoopEvent( void ) case UnmapNotify: /* We get this when iconifying a window. */ GETWINDOW( xunmap ); - fgSetWindow( window ); INVOKE_WCB( *window, WindowStatus, ( GLUT_HIDDEN ) ); window->State.Visible = GL_FALSE; break; @@ -1100,14 +1099,6 @@ void FGAPIENTRY glutMainLoopEvent( void ) case VisibilityNotify: { - GETWINDOW( xvisibility ); - /* - * XXX INVOKE_WCB() does this check for us. - */ - if( ! FETCH_WCB( *window, WindowStatus ) ) - break; - fgSetWindow( window ); - /* * Sending this event, the X server can notify us that the window * has just acquired one of the three possible visibility states: @@ -1116,6 +1107,7 @@ void FGAPIENTRY glutMainLoopEvent( void ) * VisibilityNotify event when iconifying a window, we only get an * UnmapNotify then. */ + GETWINDOW( xvisibility ); switch( event.xvisibility.state ) { case VisibilityUnobscured: