diff --git a/freeglut/freeglut/src/mswin/fg_main_mswin.c b/freeglut/freeglut/src/mswin/fg_main_mswin.c index be412ba..a791222 100644 --- a/freeglut/freeglut/src/mswin/fg_main_mswin.c +++ b/freeglut/freeglut/src/mswin/fg_main_mswin.c @@ -536,6 +536,11 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPAR /* Check window visible, we don't want to call the position callback when the user minimized the window */ if (window->State.Visible) { + /* Get top-left of non-client area of window, matching coordinates of + * glutInitPosition and glutPositionWindow, but not those of + * glutGet(GLUT_WINDOW_X) and glutGet(GLUT_WINDOW_Y), which return + * top-left of client area. + */ GetWindowRect( window->Window.Handle, &windowRect ); if (window->Parent) diff --git a/freeglut/web-src/docs/api.php b/freeglut/web-src/docs/api.php index 7b96502..c8d0a7d 100644 --- a/freeglut/web-src/docs/api.php +++ b/freeglut/web-src/docs/api.php @@ -303,13 +303,18 @@ sizes in order to subtract them off the window's initial position until some time after the window has been created. Therefore we decided on the following behavior, both under Windows and under UNIX/X11:
void glutPositionFunc ( void (* callback)( int x, int y) );
+Description
+ +When FreeGLUT calls this callback, it provides the new +position on the screen of the top-left of the non-client area, +that is, the same coordinates used by glutInitPosition and +glutPositionWindow. To get the position on the screen of the +top-left of the client area, use glutGet(GLUT_WINDOW_X) and +glutGet(GLUT_WINDOW_Y). See FreeGLUT's +conventions for more information.
+Changes From GLUT
This function is not implemented in GLUT.