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:
parent
1ac66fba61
commit
2682a53352
@ -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(
|
||||
|
Reference in New Issue
Block a user