John's fix for the minimize/close/maximize controls no longer working.

WIN32 expected us to pass the message on up the chain (or do something
else with it), rather than just throwing away the event, for a certain
class of events.  (See the diffs for more details.)

The code is also slightly reformatted from what was previously in the
repository.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@334 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
rkrolib 2003-11-10 18:19:53 +00:00
parent b1c4e6beb8
commit 7621f53262

View File

@ -1688,70 +1688,73 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
break; break;
case WM_SYSCOMMAND : /* 0x0112 */ case WM_SYSCOMMAND : /* 0x0112 */
{ {
/* /*
* 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 "lParam" parameter:
* Clicking on a corner to resize the window gives a "F004" message * Clicking on a corner to resize the window gives a "F004" message
* but this is not defined in my header file. * but this is not defined in my header file.
*/ */
switch ( lParam ) switch ( lParam )
{ {
case SC_SIZE : case SC_SIZE :
break ; break ;
case SC_MOVE : case SC_MOVE :
break ; break ;
case SC_MINIMIZE : case SC_MINIMIZE :
/* User has clicked on the "-" to minimize the window */ /* User has clicked on the "-" to minimize the window */
/* Turn off the visibility */ /* Turn off the visibility */
window->State.Visible = GL_FALSE ; window->State.Visible = GL_FALSE ;
break ; break ;
case SC_MAXIMIZE : case SC_MAXIMIZE :
break ; break ;
case SC_NEXTWINDOW : case SC_NEXTWINDOW :
break ; break ;
case SC_PREVWINDOW : case SC_PREVWINDOW :
break ; break ;
case SC_CLOSE : case SC_CLOSE :
/* Followed very closely by a WM_CLOSE message */ /* Followed very closely by a WM_CLOSE message */
break ; break ;
case SC_VSCROLL : case SC_VSCROLL :
break ; break ;
case SC_HSCROLL : case SC_HSCROLL :
break ; break ;
case SC_MOUSEMENU : case SC_MOUSEMENU :
break ; break ;
case SC_KEYMENU : case SC_KEYMENU :
break ; break ;
case SC_ARRANGE : case SC_ARRANGE :
break ; break ;
case SC_RESTORE : case SC_RESTORE :
break ; break ;
case SC_TASKLIST : case SC_TASKLIST :
break ; break ;
case SC_SCREENSAVE : case SC_SCREENSAVE :
break ; break ;
case SC_HOTKEY : case SC_HOTKEY :
break ; break ;
} }
} }
break ;
/* We need to pass the message on to the operating system as well */
lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
break;
default: default:
/* /*