John Fay: A bug fix re: behavior of the code when the user clicks the "x" to close a window, and commentary to a message type with fixes for a Windows event processing bug.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@502 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
ae113a8850
commit
994e73cad8
@ -572,8 +572,9 @@ void FGAPIENTRY glutMainLoopEvent( void )
|
|||||||
fgDeinitialize( );
|
fgDeinitialize( );
|
||||||
exit( 0 );
|
exit( 0 );
|
||||||
}
|
}
|
||||||
|
else if( fgState.ActionOnWindowClose == GLUT_ACTION_GLUTMAINLOOP_RETURNS )
|
||||||
fgState.ExecState = GLUT_EXEC_STATE_STOP;
|
fgState.ExecState = GLUT_EXEC_STATE_STOP;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1086,7 +1087,9 @@ void FGAPIENTRY glutMainLoopEvent( void )
|
|||||||
fgDeinitialize( );
|
fgDeinitialize( );
|
||||||
exit( 0 );
|
exit( 0 );
|
||||||
}
|
}
|
||||||
|
else if( fgState.ActionOnWindowClose == GLUT_ACTION_GLUTMAINLOOP_RETURNS )
|
||||||
fgState.ExecState = GLUT_EXEC_STATE_STOP;
|
fgState.ExecState = GLUT_EXEC_STATE_STOP;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1894,11 +1897,15 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
|
|||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* We have received a system command message. Try to act on it.
|
* We have received a system command message. Try to act on it.
|
||||||
* The commands are passed in through the "lParam" parameter:
|
* The commands are passed in through the "wParam" parameter:
|
||||||
* Clicking on a corner to resize the window gives a "F004" message
|
* The least significant digit seems to be which edge of the window
|
||||||
* but this is not defined in my header file.
|
* is being used for a resize event:
|
||||||
|
* 4 3 5
|
||||||
|
* 1 2
|
||||||
|
* 7 6 8
|
||||||
|
* Congratulations and thanks to Richard Rauch for figuring this out..
|
||||||
*/
|
*/
|
||||||
switch ( lParam )
|
switch ( wParam & 0xfff0 )
|
||||||
{
|
{
|
||||||
case SC_SIZE :
|
case SC_SIZE :
|
||||||
break ;
|
break ;
|
||||||
@ -1952,6 +1959,12 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
|
|||||||
|
|
||||||
case SC_HOTKEY :
|
case SC_HOTKEY :
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
|
default:
|
||||||
|
#if _DEBUG
|
||||||
|
fgWarning( "Unknown wParam type 0x%x\n", wParam );
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* !TARGET_HOST_WINCE */
|
#endif /* !TARGET_HOST_WINCE */
|
||||||
|
Reference in New Issue
Block a user