X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;ds=sidebyside;f=src%2Ffreeglut_window.c;h=0c65fc415f964cbb711a61689508df54bf436705;hb=9338532e9e7986bb018825c869ddeaaa535da8e2;hp=14733e2aa31f879845589ddb463d632509946b3a;hpb=ed72c76d33b105b8e3228fc611f26f6ebe7d5c0b;p=freeglut diff --git a/src/freeglut_window.c b/src/freeglut_window.c index 14733e2..0c65fc4 100644 --- a/src/freeglut_window.c +++ b/src/freeglut_window.c @@ -1213,15 +1213,52 @@ void FGAPIENTRY glutFullScreen( void ) { freeglut_assert_ready; freeglut_assert_window; - /* - * Just have the window repositioned and resized - */ - glutPositionWindow( 0, 0 ); +#if TARGET_HOST_UNIX_X11 + { + int x, y; + Window w; + + XTranslateCoordinates( + fgDisplay.Display, + fgStructure.Window->Window.Handle, + fgDisplay.RootWindow, + 0, 0, &x, &y, &w + ); + + if (w) + { + XTranslateCoordinates( + fgDisplay.Display, + fgStructure.Window->Window.Handle, + w, 0, 0, &x, &y, &w + ); + + x = -x; + y = -y; + } + else + { + x = y = 0; + } - glutReshapeWindow( + XMoveResizeWindow( + fgDisplay.Display, + fgStructure.Window->Window.Handle, + x, y, + fgDisplay.ScreenWidth, + fgDisplay.ScreenHeight + ); + XFlush( fgDisplay.Display ); + } +#elif TARGET_HOST_WIN32 + MoveWindow( + fgStructure.Window->Window.Handle, + 0, 0, fgDisplay.ScreenWidth, - fgDisplay.ScreenHeight + fgDisplay.ScreenHeight, + TRUE ); +#endif } /* @@ -1238,12 +1275,3 @@ void FGAPIENTRY glutSetWindowData(void* data) } /*** END OF FILE ***/ - - - - - - - - -