implemented position callback on windows and some other minor edits
[freeglut] / src / mswin / fg_state_mswin.c
index 9ce47fa..bea609e 100644 (file)
@@ -187,11 +187,9 @@ int fgPlatformGlutGet ( GLenum eWhat )
         if (fgStructure.CurrentWindow->Parent && (eWhat==GLUT_WINDOW_X || eWhat==GLUT_WINDOW_Y))
         {
             /* For child window, we should return relative to upper-left
-             *  of parent's client area.
+             * of parent's client area.
              */
-            POINT topleft;
-            topleft.x = winRect.left;
-            topleft.y = winRect.top;
+            POINT topleft = {winRect.left,winRect.top};
 
             ScreenToClient(fgStructure.CurrentWindow->Parent->Window.Handle,&topleft);
             winRect.left = topleft.x;
@@ -210,7 +208,7 @@ int fgPlatformGlutGet ( GLenum eWhat )
     break;
 
     case GLUT_WINDOW_BORDER_WIDTH :
-    case GLUT_WINDOW_HEADER_HEIGHT :
+    case GLUT_WINDOW_BORDER_HEIGHT :
 #if defined(_WIN32_WCE)
         return 0;
 #else
@@ -249,8 +247,7 @@ int fgPlatformGlutGet ( GLenum eWhat )
             {
             case GLUT_WINDOW_BORDER_WIDTH:
                 return borderWidth;
-            case GLUT_WINDOW_HEADER_HEIGHT:
-                /* Need to query for WS_MAXIMIZEBOX to see if we have a title bar, the WS_CAPTION query is also true for a WS_DLGFRAME only... */
+            case GLUT_WINDOW_BORDER_HEIGHT:
                 return captionHeight;
             }
         }