I have traced the problem to lines 106ff ("void
fghReshapeWindowByHandle") in the file "freeglut_main.c".
Unfortunately, the ugly question of window positioning and
decorations has come up again. GLUT behaved differently depending on
whether it was running on Windows or X11 (this was a Very Bad Thing). Just
for the record, according to my understanding (and this is borne out by a
comment in "freeglut_state.c" around lines 340-350) ...
- glutReshapeWindow takes the width and height of the
drawable area of the window, without any decorations
- glutPositionWindow takes the position of the upper
left-hand corner of the window; the drawable area (for a decorated window)
starts a bit to the right and quite a bit down from this point
- glutGet returns the position of the upper left-hand corner
of the drawable area and the dimensions of the drawable area
I believe that we chose these behaviours to maximize the
compatibility with GLUT. If my understanding of any of this is incorrect,
please let me know.
John F. Fay
From: Fay John F Contr AAC/WMG
Sent: Friday, September 03, 2004 9:11 AM
Subject: Subwindow Sizing Doesn't Work
Does anybody know when subwindow sizes quit working correctly? If
you look at the GLUT "bounce" demo, the sliders at the bottom of the screen
are subwindows whose position and size are specified by negative numbers
(position from the other edge of the screen, size indicated in pixels from
the opposite end of the screen). I am working on a fix which shouldn't be
too hard, but they used to work.
John F. Fay
Get latest updates about Open Source Projects, Conferences and News.