From: Diederick Niehorster Date: Fri, 1 Mar 2013 02:42:14 +0000 (+0000) Subject: made fghVisibility more intuitive, documented glutVisibilityfunc and X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;h=77ee35c8d522dddac4e2c88e8de166491d4d762c;p=freeglut made fghVisibility more intuitive, documented glutVisibilityfunc and glutWindowStatusFunc git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1534 7f0cb862-5218-0410-a997-914c9d46530a --- 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 )