Implementing "glutEntryFunc" for Windows properly. I also moved the menu highlight code so that needs checking.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@836 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
23c2780aab
commit
755316c21d
@ -1682,12 +1682,25 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
|
||||
}
|
||||
|
||||
break;
|
||||
#if 0
|
||||
|
||||
case WM_SETFOCUS:
|
||||
/* printf("WM_SETFOCUS: %p\n", window ); */
|
||||
lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
|
||||
INVOKE_WCB( *window, Entry, ( GLUT_ENTERED ) );
|
||||
break;
|
||||
|
||||
case WM_KILLFOCUS:
|
||||
/* printf("WM_KILLFOCUS: %p\n", window ); */
|
||||
lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
|
||||
INVOKE_WCB( *window, Entry, ( GLUT_LEFT ) );
|
||||
|
||||
if( window->IsMenu &&
|
||||
window->ActiveMenu && window->ActiveMenu->IsActive )
|
||||
fgUpdateMenuHighlight( window->ActiveMenu );
|
||||
|
||||
break;
|
||||
|
||||
#if 0
|
||||
case WM_ACTIVATE:
|
||||
if (LOWORD(wParam) != WA_INACTIVE)
|
||||
{
|
||||
@ -1733,20 +1746,6 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
|
||||
*/
|
||||
return 0;
|
||||
|
||||
/* XXX For a future patch: we need a mouse entry event. Unfortunately Windows
|
||||
* XXX doesn't give us one, so we will probably need a "MouseInWindow" flag in
|
||||
* XXX the SFG_Window structure. Set it to true to begin with and then have the
|
||||
* XXX WM_MOUSELEAVE code set it to false. Then when we get a WM_MOUSEMOVE event,
|
||||
* XXX if the flag is false we invoke the Entry callback and set the flag to true.
|
||||
*/
|
||||
case 0x02a3: /* This is the message we get when the mouse is leaving the window */
|
||||
if( window->IsMenu &&
|
||||
window->ActiveMenu && window->ActiveMenu->IsActive )
|
||||
fgUpdateMenuHighlight( window->ActiveMenu );
|
||||
|
||||
INVOKE_WCB( *window, Entry, ( GLUT_LEFT ) );
|
||||
break ;
|
||||
|
||||
case WM_MOUSEMOVE:
|
||||
{
|
||||
#if defined(_WIN32_WCE)
|
||||
|
Reference in New Issue
Block a user