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
This commit is contained in:
cjp 2003-10-29 23:01:56 +00:00
parent 1ac66fba61
commit 2682a53352

View File

@ -1218,6 +1218,15 @@ void FGAPIENTRY glutFullScreen( void )
int x, y; int x, y;
Window w; Window w;
XMoveResizeWindow(
fgDisplay.Display,
fgStructure.Window->Window.Handle,
0, 0,
fgDisplay.ScreenWidth,
fgDisplay.ScreenHeight
);
XFlush( fgDisplay.Display );
XTranslateCoordinates( XTranslateCoordinates(
fgDisplay.Display, fgDisplay.Display,
fgStructure.Window->Window.Handle, fgStructure.Window->Window.Handle,
@ -1225,31 +1234,16 @@ void FGAPIENTRY glutFullScreen( void )
0, 0, &x, &y, &w 0, 0, &x, &y, &w
); );
if (w) if (x || y)
{ {
XTranslateCoordinates( XMoveWindow(
fgDisplay.Display, fgDisplay.Display,
fgStructure.Window->Window.Handle, fgStructure.Window->Window.Handle,
w, 0, 0, &x, &y, &w -x, -y
);
x = -x;
y = -y;
}
else
{
x = y = 0;
}
XMoveResizeWindow(
fgDisplay.Display,
fgStructure.Window->Window.Handle,
x, y,
fgDisplay.ScreenWidth,
fgDisplay.ScreenHeight
); );
XFlush( fgDisplay.Display ); XFlush( fgDisplay.Display );
} }
}
#elif TARGET_HOST_WIN32 #elif TARGET_HOST_WIN32
MoveWindow( MoveWindow(
fgStructure.Window->Window.Handle, fgStructure.Window->Window.Handle,