X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_state.c;fp=src%2Ffreeglut_state.c;h=cafdfb9faab101f8d34169dd499aa1a6c605b213;hb=027fcf9e66356b06563140740f8d1c7bc05c9987;hp=cca7b9226d45aef68c43b00c441a4f9da876ec31;hpb=f774a7299ff2cc23a1608267cdfc70bfb41930fd;p=freeglut diff --git a/src/freeglut_state.c b/src/freeglut_state.c index cca7b92..cafdfb9 100644 --- a/src/freeglut_state.c +++ b/src/freeglut_state.c @@ -64,6 +64,30 @@ static int fghGetConfig( int attribute ) } #endif +/* Check if the window is in full screen state. */ +static int fghCheckFullScreen(void) +{ +#if TARGET_HOST_POSIX_X11 + + int result; + + result = 0; + if (fgDisplay.StateFullScreen != None) + { + result = fgHintPresent(fgStructure.CurrentWindow->Window.Handle, + fgDisplay.State, + fgDisplay.StateFullScreen); + } + + return result; + +#else + + return 0; + +#endif +} + /* -- INTERFACE FUNCTIONS -------------------------------------------------- */ /* @@ -512,6 +536,10 @@ int FGAPIENTRY glutGet( GLenum eWhat ) return fgState.DirectContext; break; + case GLUT_FULL_SCREEN: + return fghCheckFullScreen(); + break; + default: fgWarning( "glutGet(): missing enum handle %d", eWhat ); break;