X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffg_callbacks.c;h=01b256e9a21f547c5e1a36b67b8cbe41f3946a77;hb=77ee35c8d522dddac4e2c88e8de166491d4d762c;hp=9451af0a7da580881c9621f50af614969fa229ee;hpb=8792e03c07aeeb47a4b0c76864a6658d625a3557;p=freeglut diff --git a/src/fg_callbacks.c b/src/fg_callbacks.c index 9451af0..01b256e 100644 --- a/src/fg_callbacks.c +++ b/src/fg_callbacks.c @@ -168,14 +168,18 @@ void FGAPIENTRY glutDisplayFunc( FGCBDisplay callback ) */ static void fghVisibility( int status ) { - int glut_status = GLUT_VISIBLE; + int vis_status; FREEGLUT_INTERNAL_ERROR_EXIT_IF_NOT_INITIALISED ( "Visibility Callback" ); freeglut_return_if_fail( fgStructure.CurrentWindow ); + /* Translate window status func states to visibility states */ if( ( GLUT_HIDDEN == status ) || ( GLUT_FULLY_COVERED == status ) ) - glut_status = GLUT_NOT_VISIBLE; - INVOKE_WCB( *( fgStructure.CurrentWindow ), Visibility, ( glut_status ) ); + vis_status = GLUT_NOT_VISIBLE; + else /* GLUT_FULLY_RETAINED, GLUT_PARTIALLY_RETAINED */ + vis_status = GLUT_VISIBLE; + + INVOKE_WCB( *( fgStructure.CurrentWindow ), Visibility, ( vis_status ) ); } void FGAPIENTRY glutVisibilityFunc( FGCBVisibility callback )