Yes, I rather strongly object to changing "freeglut" to return the application window position on Win32 instead of the position of the client area.  We discussed the matter at a considerable length and decided that self-consistency was better than compatibility with GLUT.  GLUT behaves differently in this respect on Win32 and on X11 and this was breaking my (supposedly) platform-independent application code.

If you need the window position, please have your application subtract off the border thicknesses itself.

John F. Fay

-----Original Message-----
From: Nigel Stewart and Fiona Smith []
Sent: Monday, December 29, 2003 9:08 PM
Subject: Re: [Freeglut-developer] FreeGLUT window position (Win32)

> This adjustment logic seems to date right back to rev 1.1 July 2001,
> can anyone guess why glutGet(GLUT_WINDOW_X) and
> glutGet(GLUT_WINDOW_Y) should refer to the client area, rather
> than the true application window position?

        Are there any objections to changing freeglut to return
        the application window position on Win32, rather than the
        position of the client area?

        Two reasons:

        1.      GLUT compatibility
        2.      Make it possible for client code to move a
                 window to a previously known position.

        We would be parting from a documented decision:

          *  Therefore we decided on the following
          *  behaviour, both under Windows and under UNIX/X11:
          *  - When you create a window with position (x,y) and size
          *    (w,h), the upper left hand corner of the outside of the
          *    window is at (x,y) and the size of the drawable area  is
          *    (w,h).
          *  - When you query the size and position of the window--as
          *    is happening here for Windows--"freeglut" will return
          *    the size of the drawable area--the (w,h) that you
          *    specified when you created the window--and the coordinates
          *    of the upper left hand corner of the drawable
          *    area--which is NOT the (x,y) you specified.


This email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now!
Freeglut-developer mailing list