Rewrote glutFullscreen().
It now correctly places the window in X11. It now uses system dependant code for more efficient use of windowing system calls. git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@265 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
3d344ad2de
commit
1ac66fba61
@ -1213,15 +1213,52 @@ void FGAPIENTRY glutFullScreen( void )
|
|||||||
{
|
{
|
||||||
freeglut_assert_ready; freeglut_assert_window;
|
freeglut_assert_ready; freeglut_assert_window;
|
||||||
|
|
||||||
/*
|
#if TARGET_HOST_UNIX_X11
|
||||||
* Just have the window repositioned and resized
|
{
|
||||||
*/
|
int x, y;
|
||||||
glutPositionWindow( 0, 0 );
|
Window w;
|
||||||
|
|
||||||
glutReshapeWindow(
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
XMoveResizeWindow(
|
||||||
|
fgDisplay.Display,
|
||||||
|
fgStructure.Window->Window.Handle,
|
||||||
|
x, y,
|
||||||
fgDisplay.ScreenWidth,
|
fgDisplay.ScreenWidth,
|
||||||
fgDisplay.ScreenHeight
|
fgDisplay.ScreenHeight
|
||||||
);
|
);
|
||||||
|
XFlush( fgDisplay.Display );
|
||||||
|
}
|
||||||
|
#elif TARGET_HOST_WIN32
|
||||||
|
MoveWindow(
|
||||||
|
fgStructure.Window->Window.Handle,
|
||||||
|
0, 0,
|
||||||
|
fgDisplay.ScreenWidth,
|
||||||
|
fgDisplay.ScreenHeight,
|
||||||
|
TRUE
|
||||||
|
);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1238,12 +1275,3 @@ void FGAPIENTRY glutSetWindowData(void* data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*** END OF FILE ***/
|
/*** END OF FILE ***/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user