En masse removal of most (I think) of the remaining hard TABs in files.

There are still a couple of files that need to be hit.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@281 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
rkrolib 2003-10-31 11:33:12 +00:00
parent 5a1317c0f4
commit c89d0c24d9
5 changed files with 163 additions and 163 deletions

View File

@ -102,7 +102,7 @@ void fgInitialize( const char* displayName )
if( !glXQueryExtension( fgDisplay.Display, NULL, NULL ) ) if( !glXQueryExtension( fgDisplay.Display, NULL, NULL ) )
fgError( "OpenGL GLX extension not supported by display '%s'", fgError( "OpenGL GLX extension not supported by display '%s'",
XDisplayName( displayName ) ); XDisplayName( displayName ) );
fgDisplay.Screen = DefaultScreen( fgDisplay.Display ); fgDisplay.Screen = DefaultScreen( fgDisplay.Display );
fgDisplay.RootWindow = RootWindow( fgDisplay.RootWindow = RootWindow(
@ -124,8 +124,8 @@ void fgInitialize( const char* displayName )
fgDisplay.Screen fgDisplay.Screen
); );
fgDisplay.ScreenHeightMM = DisplayHeightMM( fgDisplay.ScreenHeightMM = DisplayHeightMM(
fgDisplay.Display, fgDisplay.Display,
fgDisplay.Screen fgDisplay.Screen
); );
fgDisplay.Connection = ConnectionNumber( fgDisplay.Display ); fgDisplay.Connection = ConnectionNumber( fgDisplay.Display );
@ -209,7 +209,7 @@ void fgDeinitialize( void )
if( !fgState.Time.Set ) if( !fgState.Time.Set )
{ {
fgWarning( "fgDeinitialize(): fgState.Timer is null => " fgWarning( "fgDeinitialize(): fgState.Timer is null => "
"no valid initialization has been performed" ); "no valid initialization has been performed" );
return; return;
} }
@ -297,14 +297,14 @@ void FGAPIENTRY glutInit( int* pargc, char** argv )
int i, j, argc = *pargc; int i, j, argc = *pargc;
if (pargc && *pargc && argv && *argv && **argv) if (pargc && *pargc && argv && *argv && **argv)
fgState.ProgramName = strdup (*argv); fgState.ProgramName = strdup (*argv);
else else
fgState.ProgramName = strdup (""); fgState.ProgramName = strdup ("");
if (!fgState.ProgramName) if (!fgState.ProgramName)
fgError ("Could not allocate space for the program's name."); fgError ("Could not allocate space for the program's name.");
if( fgState.Time.Set ) if( fgState.Time.Set )
fgError( "illegal glutInit() reinitialization attemp" ); fgError( "illegal glutInit() reinitialization attemp" );
fgCreateStructure(); fgCreateStructure();
@ -328,12 +328,12 @@ void FGAPIENTRY glutInit( int* pargc, char** argv )
#if TARGET_HOST_WIN32 #if TARGET_HOST_WIN32
if ( !getenv ( "DISPLAY" ) ) if ( !getenv ( "DISPLAY" ) )
displayName = strdup ( "" ) ; displayName = strdup ( "" ) ;
else else
#endif #endif
displayName = strdup( getenv( "DISPLAY" ) ); displayName = strdup( getenv( "DISPLAY" ) );
if (!displayName) if (!displayName)
fgError ("Could not allocate space for display name."); fgError ("Could not allocate space for display name.");
for( i=1; i<argc; i++ ) for( i=1; i<argc; i++ )
{ {
@ -343,11 +343,11 @@ void FGAPIENTRY glutInit( int* pargc, char** argv )
fgError( "-display parameter must be followed by display name" ); fgError( "-display parameter must be followed by display name" );
if( displayName ) if( displayName )
free( displayName ); free( displayName );
displayName = strdup( argv[ i ] ); displayName = strdup( argv[ i ] );
if (!displayName) if (!displayName)
fgError( "Could not allocate space for display name (%s)", fgError( "Could not allocate space for display name (%s)",
argv [i]); argv [i]);
argv[ i - 1 ] = NULL; argv[ i - 1 ] = NULL;
argv[ i ] = NULL; argv[ i ] = NULL;
@ -355,46 +355,46 @@ void FGAPIENTRY glutInit( int* pargc, char** argv )
} }
else if( strcmp( argv[ i ], "-geometry" ) == 0 ) else if( strcmp( argv[ i ], "-geometry" ) == 0 )
{ {
int result, x, y; int result, x, y;
unsigned int w, h; unsigned int w, h;
if ( ++i >= argc ) if ( ++i >= argc )
fgError( "-geometry parameter must be followed by window " fgError( "-geometry parameter must be followed by window "
"geometry settings" ); "geometry settings" );
result = sscanf ( argv[i], "%dx%d+%d+%d", &x, &y, &w, &h ); result = sscanf ( argv[i], "%dx%d+%d+%d", &x, &y, &w, &h );
if ( result > 3 ) if ( result > 3 )
fgState.Size.Y = h; fgState.Size.Y = h;
if ( result > 2 ) if ( result > 2 )
fgState.Size.X = w; fgState.Size.X = w;
if( result > 1 ) if( result > 1 )
{ {
if( y < 0 ) if( y < 0 )
fgState.Position.Y = fgState.Position.Y =
fgDisplay.ScreenHeight + y - fgState.Size.Y; fgDisplay.ScreenHeight + y - fgState.Size.Y;
else else
fgState.Position.Y = y; fgState.Position.Y = y;
} }
if( result > 0 ) if( result > 0 )
{ {
if( x < 0 ) if( x < 0 )
fgState.Position.X = fgState.Position.X =
fgDisplay.ScreenWidth + x - fgState.Size.X; fgDisplay.ScreenWidth + x - fgState.Size.X;
else else
fgState.Position.X = x; fgState.Position.X = x;
} }
argv[ i - 1 ] = NULL; argv[ i - 1 ] = NULL;
argv[ i ] = NULL; argv[ i ] = NULL;
(*pargc) -= 2; (*pargc) -= 2;
} }
else if( strcmp( argv[ i ], "-direct" ) == 0) else if( strcmp( argv[ i ], "-direct" ) == 0)
{ {
if( fgState.TryDirectContext == FALSE ) if( fgState.TryDirectContext == FALSE )
fgError( "parameters ambiguity, -direct and -indirect " fgError( "parameters ambiguity, -direct and -indirect "
"cannot be both specified" ); "cannot be both specified" );
fgState.ForceDirectContext = TRUE; fgState.ForceDirectContext = TRUE;
argv[ i ] = NULL; argv[ i ] = NULL;
@ -404,7 +404,7 @@ void FGAPIENTRY glutInit( int* pargc, char** argv )
{ {
if( fgState.ForceDirectContext == TRUE ) if( fgState.ForceDirectContext == TRUE )
fgError( "parameters ambiguity, -direct and -indirect " fgError( "parameters ambiguity, -direct and -indirect "
"cannot be both specified" ); "cannot be both specified" );
fgState.TryDirectContext = FALSE; fgState.TryDirectContext = FALSE;
argv[ i ] = NULL; argv[ i ] = NULL;
@ -436,13 +436,13 @@ void FGAPIENTRY glutInit( int* pargc, char** argv )
j = 2 ; j = 2 ;
for( i = 1; i < *pargc; i++, j++ ) for( i = 1; i < *pargc; i++, j++ )
{ {
if( argv[ i ] == NULL ) if( argv[ i ] == NULL )
{ {
/* Guaranteed to end because there are "*pargc" arguments left */ /* Guaranteed to end because there are "*pargc" arguments left */
while ( argv[j] == NULL ) while ( argv[j] == NULL )
j++; j++;
argv[i] = argv[j] ; argv[i] = argv[j] ;
} }
} }
/* /*
@ -468,7 +468,7 @@ void FGAPIENTRY glutInit( int* pargc, char** argv )
fgState.Size.Use = FALSE; fgState.Size.Use = FALSE;
if( displayName ) if( displayName )
free( displayName ); free( displayName );
} }
/* /*
@ -576,7 +576,7 @@ static GScannerConfig fgInitDisplayStringScannerConfig =
G_CSET_a_2_z G_CSET_a_2_z
"_" "_"
G_CSET_A_2_Z G_CSET_A_2_Z
) /* cset_identifier_first */, ) /* cset_identifier_first */,
( (
G_CSET_a_2_z G_CSET_a_2_z
"_0123456789" "_0123456789"
@ -584,29 +584,29 @@ static GScannerConfig fgInitDisplayStringScannerConfig =
G_CSET_LATINS G_CSET_LATINS
G_CSET_LATINC G_CSET_LATINC
"<>!=~" "<>!=~"
) /* cset_identifier_nth */, ) /* cset_identifier_nth */,
( "#\n" ) /* cpair_comment_single */, ( "#\n" ) /* cpair_comment_single */,
FALSE /* case_sensitive */, FALSE /* case_sensitive */,
TRUE /* skip_comment_multi */, TRUE /* skip_comment_multi */,
TRUE /* skip_comment_single */, TRUE /* skip_comment_single */,
TRUE /* scan_comment_multi */, TRUE /* scan_comment_multi */,
TRUE /* scan_identifier */, TRUE /* scan_identifier */,
FALSE /* scan_identifier_1char */, FALSE /* scan_identifier_1char */,
FALSE /* scan_identifier_NULL */, FALSE /* scan_identifier_NULL */,
TRUE /* scan_symbols */, TRUE /* scan_symbols */,
FALSE /* scan_binary */, FALSE /* scan_binary */,
TRUE /* scan_octal */, TRUE /* scan_octal */,
TRUE /* scan_float */, TRUE /* scan_float */,
TRUE /* scan_hex */, TRUE /* scan_hex */,
FALSE /* scan_hex_dollar */, FALSE /* scan_hex_dollar */,
TRUE /* scan_string_sq */, TRUE /* scan_string_sq */,
TRUE /* scan_string_dq */, TRUE /* scan_string_dq */,
TRUE /* numbers_2_int */, TRUE /* numbers_2_int */,
FALSE /* int_2_float */, FALSE /* int_2_float */,
FALSE /* identifier_2_string */, FALSE /* identifier_2_string */,
TRUE /* char_2_token */, TRUE /* char_2_token */,
FALSE /* symbol_2_token */, FALSE /* symbol_2_token */,
FALSE /* scope_0_fallback */, FALSE /* scope_0_fallback */,
}; };
/* /*
@ -723,9 +723,9 @@ void FGAPIENTRY glutInitDisplayString( char* displayMode )
if( comparison != FG_NONE && i < (gint) strlen( scanner->value.v_identifier ) ) if( comparison != FG_NONE && i < (gint) strlen( scanner->value.v_identifier ) )
{ {
valueString = strdup( scanner->value.v_identifier + i ); valueString = strdup( scanner->value.v_identifier + i );
if (!valueString) if (!valueString)
fgError ("Could not allocate an internal string."); fgError ("Could not allocate an internal string.");
} }
/* /*
* If there was a value string, convert it to integer... * If there was a value string, convert it to integer...

View File

@ -241,7 +241,7 @@ static void fghJoystickRawRead ( SFG_Joystick* joy, int* buttons, float* axes )
case JS_EVENT_BUTTON: case JS_EVENT_BUTTON:
if ( joy->js.value == 0 ) /* clear the flag */ if ( joy->js.value == 0 ) /* clear the flag */
joy->tmp_buttons &= ~(1 << joy->js.number); joy->tmp_buttons &= ~(1 << joy->js.number);
else else
joy->tmp_buttons |= (1 << joy->js.number); joy->tmp_buttons |= (1 << joy->js.number);
break; break;

View File

@ -169,7 +169,7 @@ static void fghcbDisplayWindow( SFG_Window *window, SFG_Enumerator *enumerator )
RedrawWindow( RedrawWindow(
window->Window.Handle, NULL, NULL, window->Window.Handle, NULL, NULL,
RDW_NOERASE | RDW_INTERNALPAINT | RDW_INVALIDATE | RDW_UPDATENOW RDW_NOERASE | RDW_INTERNALPAINT | RDW_INVALIDATE | RDW_UPDATENOW
); );
} }
#endif #endif
@ -237,7 +237,7 @@ static void fghCheckTimers( void )
timer; timer;
timer = (SFG_Timer *)next ) timer = (SFG_Timer *)next )
{ {
next = (SFG_Timer *)timer->Node.Next; next = (SFG_Timer *)timer->Node.Next;
if( timer->TriggerTime <= checkTime ) if( timer->TriggerTime <= checkTime )
{ {
@ -339,8 +339,8 @@ static void fgCheckJoystickCallback( SFG_Window* w, SFG_Enumerator* e)
{ {
if( w->Callbacks.Joystick ) if( w->Callbacks.Joystick )
{ {
e->found = TRUE; e->found = TRUE;
e->data = w; e->data = w;
} }
fgEnumSubWindows( w, fgCheckJoystickCallback, e ); fgEnumSubWindows( w, fgCheckJoystickCallback, e );
} }
@ -356,8 +356,8 @@ static void fgHavePendingRedisplaysCallback( SFG_Window* w, SFG_Enumerator* e)
{ {
if( w->State.Redisplay ) if( w->State.Redisplay )
{ {
e->found = TRUE; e->found = TRUE;
e->data = w; e->data = w;
} }
fgEnumSubWindows( w, fgHavePendingRedisplaysCallback, e ); fgEnumSubWindows( w, fgHavePendingRedisplaysCallback, e );
} }
@ -386,9 +386,9 @@ static long fgNextTimer( void )
SFG_Timer *timer; SFG_Timer *timer;
for( timer = (SFG_Timer *)fgState.Timers.First; for( timer = (SFG_Timer *)fgState.Timers.First;
timer; timer;
timer = (SFG_Timer *)timer->Node.Next ) timer = (SFG_Timer *)timer->Node.Next )
ret = MIN( ret, MAX( 0, (timer->TriggerTime) - now ) ); ret = MIN( ret, MAX( 0, (timer->TriggerTime) - now ) );
return ret; return ret;
} }
@ -406,22 +406,22 @@ static void fgSleepForEvents( void )
long msec; long msec;
if( fgState.IdleCallback || if( fgState.IdleCallback ||
fgHavePendingRedisplays() ) fgHavePendingRedisplays() )
return; return;
socket = ConnectionNumber( fgDisplay.Display ); socket = ConnectionNumber( fgDisplay.Display );
FD_ZERO( &fdset ); FD_ZERO( &fdset );
FD_SET( socket, &fdset ); FD_SET( socket, &fdset );
msec = fgNextTimer(); msec = fgNextTimer();
if( fgHaveJoystick() ) if( fgHaveJoystick() )
msec = MIN( msec, 10 ); msec = MIN( msec, 10 );
wait.tv_sec = msec / 1000; wait.tv_sec = msec / 1000;
wait.tv_usec = (msec % 1000) * 1000; wait.tv_usec = (msec % 1000) * 1000;
err = select( socket+1, &fdset, NULL, NULL, &wait ); err = select( socket+1, &fdset, NULL, NULL, &wait );
if( -1 == err ) if( -1 == err )
printf( "freeglut select() error: %d\n", errno ); printf( "freeglut select() error: %d\n", errno );
#elif TARGET_HOST_WIN32 #elif TARGET_HOST_WIN32
#endif #endif
@ -650,10 +650,10 @@ void FGAPIENTRY glutMainLoopEvent( void )
*/ */
if( window->ActiveMenu != NULL ) if( window->ActiveMenu != NULL )
{ {
if ( window == window->ActiveMenu->ParentWindow ) if ( window == window->ActiveMenu->ParentWindow )
{ {
window->ActiveMenu->Window->State.MouseX = event.xmotion.x_root - window->ActiveMenu->X ; window->ActiveMenu->Window->State.MouseX = event.xmotion.x_root - window->ActiveMenu->X ;
window->ActiveMenu->Window->State.MouseY = event.xmotion.y_root - window->ActiveMenu->Y ; window->ActiveMenu->Window->State.MouseY = event.xmotion.y_root - window->ActiveMenu->Y ;
} }
/* /*
@ -729,14 +729,14 @@ void FGAPIENTRY glutMainLoopEvent( void )
GETWINDOW( xbutton ); GETMOUSE( xbutton ); GETWINDOW( xbutton ); GETMOUSE( xbutton );
/* /*
* An X button (at least in XFree86) is numbered from 1. * An X button (at least in XFree86) is numbered from 1.
* A GLUT button is numbered from 0. * A GLUT button is numbered from 0.
* Old GLUT passed through buttons other than just the first * Old GLUT passed through buttons other than just the first
* three, though it only gave symbolic names and official * three, though it only gave symbolic names and official
* support to the first three. * support to the first three.
* *
*/ */
button = event.xbutton.button - 1; button = event.xbutton.button - 1;
/* /*
* Do not execute the application's mouse callback if a menu is hooked to this button. * Do not execute the application's mouse callback if a menu is hooked to this button.
@ -751,46 +751,46 @@ void FGAPIENTRY glutMainLoopEvent( void )
*/ */
if ( window->ActiveMenu != NULL ) /* Window has an active menu, it absorbs any mouse click */ if ( window->ActiveMenu != NULL ) /* Window has an active menu, it absorbs any mouse click */
{ {
if ( window == window->ActiveMenu->ParentWindow ) if ( window == window->ActiveMenu->ParentWindow )
{ {
window->ActiveMenu->Window->State.MouseX = event.xbutton.x_root - window->ActiveMenu->X ; window->ActiveMenu->Window->State.MouseX = event.xbutton.x_root - window->ActiveMenu->X ;
window->ActiveMenu->Window->State.MouseY = event.xbutton.y_root - window->ActiveMenu->Y ; window->ActiveMenu->Window->State.MouseY = event.xbutton.y_root - window->ActiveMenu->Y ;
} }
if ( fgCheckActiveMenu ( window->ActiveMenu->Window, window->ActiveMenu ) == TRUE ) /* Inside the menu, invoke the callback and deactivate the menu*/ if ( fgCheckActiveMenu ( window->ActiveMenu->Window, window->ActiveMenu ) == TRUE ) /* Inside the menu, invoke the callback and deactivate the menu*/
{ {
/* Save the current window and menu and set the current window to the window whose menu this is */ /* Save the current window and menu and set the current window to the window whose menu this is */
SFG_Window *save_window = fgStructure.Window ; SFG_Window *save_window = fgStructure.Window ;
SFG_Menu *save_menu = fgStructure.Menu ; SFG_Menu *save_menu = fgStructure.Menu ;
SFG_Window *parent_window = window->ActiveMenu->ParentWindow ; SFG_Window *parent_window = window->ActiveMenu->ParentWindow ;
fgSetWindow ( parent_window ) ; fgSetWindow ( parent_window ) ;
fgStructure.Menu = window->ActiveMenu ; fgStructure.Menu = window->ActiveMenu ;
/* Execute the menu callback */ /* Execute the menu callback */
fgExecuteMenuCallback ( window->ActiveMenu ) ; fgExecuteMenuCallback ( window->ActiveMenu ) ;
fgDeactivateMenu ( parent_window ) ; fgDeactivateMenu ( parent_window ) ;
/* Restore the current window and menu */ /* Restore the current window and menu */
fgSetWindow ( save_window ) ; fgSetWindow ( save_window ) ;
fgStructure.Menu = save_menu ; fgStructure.Menu = save_menu ;
} }
else /* Outside the menu, deactivate the menu if it's a downclick */ else /* Outside the menu, deactivate the menu if it's a downclick */
if ( pressed == TRUE ) if ( pressed == TRUE )
fgDeactivateMenu ( window->ActiveMenu->ParentWindow ) ; fgDeactivateMenu ( window->ActiveMenu->ParentWindow ) ;
/* /*
* Let's make the window redraw as a result of the mouse click and menu activity. * Let's make the window redraw as a result of the mouse click and menu activity.
*/ */
window->State.Redisplay = TRUE ; window->State.Redisplay = TRUE ;
break ; break ;
} }
/* /*
* No active menu, let's check whether we need to activate one. * No active menu, let's check whether we need to activate one.
*/ */
if (( 0 <= button ) && ( 2 >= button ) && if (( 0 <= button ) && ( 2 >= button ) &&
( window->Menu[ button ] != NULL ) && ( pressed == TRUE ) ) ( window->Menu[ button ] != NULL ) && ( pressed == TRUE ) )
{ {
/* /*
* Let's make the window redraw as a result of the mouse click. * Let's make the window redraw as a result of the mouse click.
@ -874,7 +874,7 @@ void FGAPIENTRY glutMainLoopEvent( void )
event.type == ButtonPress ? GLUT_DOWN : GLUT_UP, event.type == ButtonPress ? GLUT_DOWN : GLUT_UP,
event.xbutton.x, event.xbutton.x,
event.xbutton.y event.xbutton.y
); );
} }
} }
@ -895,7 +895,7 @@ void FGAPIENTRY glutMainLoopEvent( void )
* A key has been pressed, find the window that had the focus: * A key has been pressed, find the window that had the focus:
*/ */
GETWINDOW( xkey ); GETWINDOW( xkey );
GETMOUSE( xkey ); GETMOUSE( xkey );
if( event.type == KeyPress ) if( event.type == KeyPress )
{ {
@ -1212,7 +1212,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
if (LOWORD(wParam) != WA_INACTIVE) if (LOWORD(wParam) != WA_INACTIVE)
{ {
/* glutSetCursor( fgStructure.Window->State.Cursor ); */ /* glutSetCursor( fgStructure.Window->State.Cursor ); */
printf("WM_ACTIVATE: glutSetCursor( %p, %d)\n", window, window->State.Cursor ); printf("WM_ACTIVATE: glutSetCursor( %p, %d)\n", window, window->State.Cursor );
glutSetCursor( window->State.Cursor ); glutSetCursor( window->State.Cursor );
} }
@ -1227,39 +1227,39 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
*/ */
#if 0 #if 0
if ((LOWORD(lParam) == HTCLIENT) && if ((LOWORD(lParam) == HTCLIENT) &&
(fgStructure.Window->State.Cursor == GLUT_CURSOR_NONE)) (fgStructure.Window->State.Cursor == GLUT_CURSOR_NONE))
SetCursor( NULL ); SetCursor( NULL );
#else #else
/* Set the cursor AND change it for this window class. */ /* Set the cursor AND change it for this window class. */
# define MAP_CURSOR(a,b) case a: SetCursor( LoadCursor( NULL, b ) ); \ # define MAP_CURSOR(a,b) case a: SetCursor( LoadCursor( NULL, b ) ); \
break; break;
/* Nuke the cursor AND change it for this window class. */ /* Nuke the cursor AND change it for this window class. */
# define ZAP_CURSOR(a,b) case a: SetCursor( NULL ); \ # define ZAP_CURSOR(a,b) case a: SetCursor( NULL ); \
break; break;
if (LOWORD(lParam) == HTCLIENT) if (LOWORD(lParam) == HTCLIENT)
switch( window->State.Cursor ) switch( window->State.Cursor )
{ {
MAP_CURSOR( GLUT_CURSOR_RIGHT_ARROW, IDC_ARROW ); MAP_CURSOR( GLUT_CURSOR_RIGHT_ARROW, IDC_ARROW );
MAP_CURSOR( GLUT_CURSOR_LEFT_ARROW, IDC_ARROW ); MAP_CURSOR( GLUT_CURSOR_LEFT_ARROW, IDC_ARROW );
MAP_CURSOR( GLUT_CURSOR_INFO, IDC_HELP ); MAP_CURSOR( GLUT_CURSOR_INFO, IDC_HELP );
MAP_CURSOR( GLUT_CURSOR_DESTROY, IDC_CROSS ); MAP_CURSOR( GLUT_CURSOR_DESTROY, IDC_CROSS );
MAP_CURSOR( GLUT_CURSOR_HELP, IDC_HELP ); MAP_CURSOR( GLUT_CURSOR_HELP, IDC_HELP );
MAP_CURSOR( GLUT_CURSOR_CYCLE, IDC_SIZEALL ); MAP_CURSOR( GLUT_CURSOR_CYCLE, IDC_SIZEALL );
MAP_CURSOR( GLUT_CURSOR_SPRAY, IDC_CROSS ); MAP_CURSOR( GLUT_CURSOR_SPRAY, IDC_CROSS );
MAP_CURSOR( GLUT_CURSOR_WAIT, IDC_WAIT ); MAP_CURSOR( GLUT_CURSOR_WAIT, IDC_WAIT );
MAP_CURSOR( GLUT_CURSOR_TEXT, IDC_UPARROW ); MAP_CURSOR( GLUT_CURSOR_TEXT, IDC_UPARROW );
MAP_CURSOR( GLUT_CURSOR_CROSSHAIR, IDC_CROSS ); MAP_CURSOR( GLUT_CURSOR_CROSSHAIR, IDC_CROSS );
/* MAP_CURSOR( GLUT_CURSOR_NONE, IDC_NO ); */ /* MAP_CURSOR( GLUT_CURSOR_NONE, IDC_NO ); */
ZAP_CURSOR( GLUT_CURSOR_NONE, NULL ); ZAP_CURSOR( GLUT_CURSOR_NONE, NULL );
default: default:
MAP_CURSOR( GLUT_CURSOR_UP_DOWN, IDC_ARROW ); MAP_CURSOR( GLUT_CURSOR_UP_DOWN, IDC_ARROW );
} }
#endif #endif
else else
lRet = DefWindowProc( hWnd, uMsg, wParam, lParam ); lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
break; break;
case WM_SHOWWINDOW: case WM_SHOWWINDOW:
window->State.Visible = TRUE; window->State.Visible = TRUE;

View File

@ -229,7 +229,7 @@ static GLboolean fghCheckMenuStatus( SFG_Window* window, SFG_Menu* menu )
if ( menuEntry->SubMenu->Y + menuEntry->SubMenu->Height > glutGet (GLUT_SCREEN_HEIGHT ) ) if ( menuEntry->SubMenu->Y + menuEntry->SubMenu->Height > glutGet (GLUT_SCREEN_HEIGHT ) )
menuEntry->SubMenu->Y -= (menuEntry->SubMenu->Height - menuEntry->SubMenu->Y -= (menuEntry->SubMenu->Height -
FREEGLUT_MENU_HEIGHT - 2*FREEGLUT_MENU_BORDER); FREEGLUT_MENU_HEIGHT - 2*FREEGLUT_MENU_BORDER);
fgSetWindow ( menuEntry->SubMenu->Window ) ; fgSetWindow ( menuEntry->SubMenu->Window ) ;
glutPositionWindow ( menuEntry->SubMenu->X, menuEntry->SubMenu->Y ) ; glutPositionWindow ( menuEntry->SubMenu->X, menuEntry->SubMenu->Y ) ;

View File

@ -230,7 +230,7 @@ int FGAPIENTRY glutGet( GLenum eWhat )
case GLUT_WINDOW_Y: return y; case GLUT_WINDOW_Y: return y;
} }
if ( w == 0 ) if ( w == 0 )
return( 0 ); return( 0 );
XTranslateCoordinates( XTranslateCoordinates(
fgDisplay.Display, fgDisplay.Display,