From 2682a53352bb6d36f6a7b2c635ea2bdcf42ec3ff Mon Sep 17 00:00:00 2001 From: cjp Date: Wed, 29 Oct 2003 23:01:56 +0000 Subject: [PATCH] There is a problem with the way I did glutFullscreen() in my last commit. So I've copied the way the game mode does it. It's not ideal but it works. The glutGet() for the window border sizes will also have to be fixed at some point. git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@266 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/src/freeglut_window.c | 32 ++++++++++--------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/freeglut/freeglut/src/freeglut_window.c b/freeglut/freeglut/src/freeglut_window.c index 0c65fc4..bf9d58f 100644 --- a/freeglut/freeglut/src/freeglut_window.c +++ b/freeglut/freeglut/src/freeglut_window.c @@ -1218,6 +1218,15 @@ void FGAPIENTRY glutFullScreen( void ) int x, y; Window w; + XMoveResizeWindow( + fgDisplay.Display, + fgStructure.Window->Window.Handle, + 0, 0, + fgDisplay.ScreenWidth, + fgDisplay.ScreenHeight + ); + XFlush( fgDisplay.Display ); + XTranslateCoordinates( fgDisplay.Display, fgStructure.Window->Window.Handle, @@ -1225,30 +1234,15 @@ void FGAPIENTRY glutFullScreen( void ) 0, 0, &x, &y, &w ); - if (w) + if (x || y) { - XTranslateCoordinates( + XMoveWindow( fgDisplay.Display, fgStructure.Window->Window.Handle, - w, 0, 0, &x, &y, &w + -x, -y ); - - x = -x; - y = -y; + XFlush( fgDisplay.Display ); } - else - { - x = y = 0; - } - - XMoveResizeWindow( - fgDisplay.Display, - fgStructure.Window->Window.Handle, - x, y, - fgDisplay.ScreenWidth, - fgDisplay.ScreenHeight - ); - XFlush( fgDisplay.Display ); } #elif TARGET_HOST_WIN32 MoveWindow(