*/
fgState.DisplayMode |= GLUT_DOUBLE ;
window->Window.VisualInfo = fgChooseVisual();
+ /* OK, we got a double-buffered window, but we only wanted
+ * single-buffered. Clear the double-buffer flag now.
+ */
+ fgState.DisplayMode &= ~GLUT_DOUBLE ;
}
/*
{
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;
+
+ XMoveResizeWindow(
+ fgDisplay.Display,
+ fgStructure.Window->Window.Handle,
+ 0, 0,
+ fgDisplay.ScreenWidth,
+ fgDisplay.ScreenHeight
+ );
+ XFlush( fgDisplay.Display );
- glutReshapeWindow(
+ XTranslateCoordinates(
+ fgDisplay.Display,
+ fgStructure.Window->Window.Handle,
+ fgDisplay.RootWindow,
+ 0, 0, &x, &y, &w
+ );
+
+ if (x || y)
+ {
+ XMoveWindow(
+ fgDisplay.Display,
+ fgStructure.Window->Window.Handle,
+ -x, -y
+ );
+ XFlush( fgDisplay.Display );
+ }
+ }
+#elif TARGET_HOST_WIN32
+ MoveWindow(
+ fgStructure.Window->Window.Handle,
+ 0, 0,
fgDisplay.ScreenWidth,
- fgDisplay.ScreenHeight
+ fgDisplay.ScreenHeight,
+ TRUE
);
+#endif
}
/*
}
/*** END OF FILE ***/
-
-
-
-
-
-
-
-
-