mask = CWBackPixmap | CWBorderPixel | CWColormap | CWEventMask;
- if( window->IsMenu )
+ if( window->IsMenu || ( gameMode == GL_TRUE ) )
{
winAttr.override_redirect = True;
mask |= CWOverrideRedirect;
&wmHints,
NULL
);
+ XFree( textProperty.value );
XSetWMProtocols( fgDisplay.Display, window->Window.Handle,
&fgDisplay.DeleteWindow, 1 );
*/
int FGAPIENTRY glutCreateWindow( const char* title )
{
+ /* XXX GLUT does not exit; it simply calls "glutInit" quietly if the
+ * XXX application has not already done so. The "freeglut" community
+ * XXX decided not to go this route (freeglut-developer e-mail from
+ * XXX Steve Baker, 12/16/04, 4:22 PM CST, "Re: [Freeglut-developer]
+ * XXX Desired 'freeglut' behaviour when there is no current window"
+ */
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutCreateWindow" );
return fgCreateWindow( NULL, title, fgState.Position.X, fgState.Position.Y,
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutCreateSubWindow" );
parent = fgWindowByID( parentID );
freeglut_return_val_if_fail( parent != NULL, 0 );
+ if ( x < 0 )
+ {
+ x = parent->State.Width + x ;
+ if ( w >= 0 ) x -= w ;
+ }
+
+ if ( w < 0 ) w = parent->State.Width - x + w ;
+ if ( w < 0 )
+ {
+ x += w ;
+ w = -w ;
+ }
+
+ if ( y < 0 )
+ {
+ y = parent->State.Height + y ;
+ if ( h >= 0 ) y -= h ;
+ }
+
+ if ( h < 0 ) h = parent->State.Height - y + h ;
+ if ( h < 0 )
+ {
+ y += h ;
+ h = -h ;
+ }
+
window = fgCreateWindow( parent, "", x, y, w, h, GL_FALSE, GL_FALSE );
ret = window->ID;