small updates to one demo, so windowed windows display after the
[freeglut] / src / mswin / fg_main_mswin.c
index a9f8552..f4a4919 100644 (file)
@@ -75,6 +75,16 @@ void fgPlatformReshapeWindow ( SFG_Window *window, int width, int height )
      * For windowed mode, get the current position of the
      * window and resize taking the size of the frame
      * decorations into account.
+     *
+     * Note on maximizing behavior of Windows: the resize borders are off
+     * the screen such that the client area extends all the way from the
+     * leftmost corner to the rightmost corner to maximize screen real
+     * estate. A caption is still shown however to allow interaction with
+     * the window controls. This is default behavior of Windows that
+     * FreeGLUT sticks with. To alter, one would have to check if
+     * WS_MAXIMIZE style is set when a resize event is triggered, and
+     * then manually correct the windowRect to put the borders back on
+     * screen.
      */
 
     /* "GetWindowRect" returns the pixel coordinates of the outside of the window */
@@ -202,7 +212,7 @@ void fgPlatformMainLoopPreliminaryWork ( void )
 
 
 /*
- * Determine a GLUT modifer mask based on MS-WINDOWS system info.
+ * Determine a GLUT modifier mask based on MS-WINDOWS system info.
  */
 static int fgPlatformGetModifiers (void)
 {
@@ -498,7 +508,7 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
 
         if (child_window)
         {
-            /* If child should have focus instead, set it here. */
+            /* If we're dealing with a child window, make sure it has input focus instead, set it here. */
             SetFocus(child_window->Window.Handle);
             SetActiveWindow( child_window->Window.Handle );
             INVOKE_WCB( *child_window, Entry, ( GLUT_ENTERED ) );
@@ -556,7 +566,7 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
     case WM_PAINT:
         /* Turn on the visibility in case it was turned off somehow */
         window->State.Visible = GL_TRUE;
-        InvalidateRect( hWnd, NULL, GL_FALSE ); /* Make sure whole window is repainted. Bit of a hack, but a safe on from what google turns up... */
+        InvalidateRect( hWnd, NULL, GL_FALSE ); /* Make sure whole window is repainted. Bit of a hack, but a safe one from what google turns up... */
         BeginPaint( hWnd, &ps );
         fghRedrawWindow( window );
         EndPaint( hWnd, &ps );