order. This cased a crash when the call to glutDestroyWindow() for a sub
windows was immediately followed by a call to glutDestroyWindow() for it's
parent. fgCloseWindows() would call fgDestroyWindow() for the parent first
fgDestroyWindws() would recurse over the children and then fgCloseWindows()
would call fgDestroyWindow() again for the child.
I've replaced the single linked list with one of our two way link list
structures. I've also moved it into fgStructure because that seemed the
consistent thing to do.
I said the the deferred windows destruction causes more problems then it
solves.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@396 7f0cb862-5218-0410-a997-914c9d46530a
{OldWidth} in the window structure should be done for both windows
and sub-windows, and the easiest way to do this is in the
freeglut_structure.c:fgCreateWindow() code. So, transplant one line.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@383 7f0cb862-5218-0410-a997-914c9d46530a
only windows left are freeglut menu windows, and correctly calls exit()
if we drop out of the main loop without having requested any freeglut
extensions to glutMainLoop() handling.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@382 7f0cb862-5218-0410-a997-914c9d46530a
* Updated shapes.c. I think that it's just reformatting and the addition
of some comments.
* Added shapes.dsp, a Microsoft Visual C++ Developer Studio Project file
for building shapes on WIN32 with MSVC++.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@381 7f0cb862-5218-0410-a997-914c9d46530a
{...Height}. Those are *not* records of the old values, but rather
of the *desired* *new* values, hence it was inappropriate to use them
in ConfigureNotify X11 event handling. Doing so introduced some new
problems.
So, I created OldHeight and OldWidth in the window State structure,
and *those* do what I require.
I also stripped out the obsolete comment about getting extra/bogus
reshape events. (Though I maintain that an application should be
robust against them, freeglut should no longer generate them if the
window has not changed size since last reported.)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@378 7f0cb862-5218-0410-a997-914c9d46530a
* Just need to call GETWINDOW() once. Ooops. Heh.
* Update {window->State} with the new size of the window.
* If the window-size has NOT changed, then do NOT call the Reshape event.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@377 7f0cb862-5218-0410-a997-914c9d46530a
definitely in need of consideration, I believe, but is not immediately
a major bug, so I'd rather not mess with it at the risk of postponing
a release "soon".)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@376 7f0cb862-5218-0410-a997-914c9d46530a
to mark the window as *needing* a reshape (which during general display
callback handling would result in effectively a glutReshapeWindow()).
The code is now system-dependant. It should be abstracted to a function,
but is presently copied in two places. Sorry.
Also, inverted the order of the associated if()/else check (in both
WIN32 and UNIX_X11 branches) since the former "else" part was a one-line
callback invocation.
This fixes two seemingly unrelated bugs that I was seeing in UNIX_X11.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@374 7f0cb862-5218-0410-a997-914c9d46530a
highst-window-ID marker when the highest window is deleted. (This
was a half-way measure for an idea that was decided to be dubious
in the first place.)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@366 7f0cb862-5218-0410-a997-914c9d46530a
Massive rework of the geometric primitive code. Includes a new
primitive (cylinder; solid and wireframe) and corresponding update
to freeglut_ext.h for the prototype.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@364 7f0cb862-5218-0410-a997-914c9d46530a
* We forgot to bump our version number in freeglut_internal.h
It is now at 2.0.2 (actually, I think that 2.1.0 might be
a better choice), which is presumably going to be our next
formal release. 2.0.1 is incorrectly identified as 2.0.0 in
the header.
* A typo in a comment has been corrected ("than"/"that").
* Numerous "manual" checks for callbacks are omitted now, since
INVOKE_WCB() does this for us. These were holdovers from the
pre-INVOKE_WCB() days. There may be some very subtle changes
in freeglut behavior, since freeglut used to test the callbacks
a little earlier in some cases and may have skipped some minor
things (like changes to the current window) in some special cases,
otherwise. It is not believed that any documented behavior is
broken, and it is unlikely---not to say impossible---that any
extant applications will detect the change. It is even possible
that there is no external behavioral change in freeglut.
This also significantly simplifies some sections of code that used
to have conditional execution. "Unconditional code is simpler code"
as one of the comments used to say.
* Lots of XXX commentary is now removed. Some of it was obsoleted
by other changes, some by changes from John.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@363 7f0cb862-5218-0410-a997-914c9d46530a
his freeglut_internal.h file where they were wrapping in EMACS; otherwise,
the files are exactly as he sent them to me).
The change unifies the WIN32 and UNIX_X11 code by defining our own
window-handle-type in freeglut_internal.h. This let John rip out some
#if garbage in several places. The result is clearer code.
Thanks, John!
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@362 7f0cb862-5218-0410-a997-914c9d46530a
(a) I re-inserted the meat of a comment that I still feel is relavent.
(b) I fixed a compile-time error in the UNIX_X11 code where a variable
is declared after executable code in a block without creating
a new sub-block for the declaration.
Changes from John include:
(a) Style revision.
(b) Changes to postpone the handling of window resizes.
Lots of lines were changed, but I think that thos two cover the ground that
he hit. See the diffs for details.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@360 7f0cb862-5218-0410-a997-914c9d46530a
Moved geometry parsing to after fgInitialize() so we can use the screen size
to correctly calculate negative positions in the geometry string.
Copied the code for XParseGeometry from the X11 sources for use in the
Win32 version.
freeglut now passes test1 of the glut test suite.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@355 7f0cb862-5218-0410-a997-914c9d46530a
Replaced referenced to Time.Set with this new variable where appropriate.
fgElapsedTime() now set the start time if Time.Set is false.
Moved glutGet(GLUT_ELAPSED_TIME) handling to before the assert.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@348 7f0cb862-5218-0410-a997-914c9d46530a
And I left alone the "INIT DISPLAY STRING PARSING" section, since
it still appears to be in flux.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@346 7f0cb862-5218-0410-a997-914c9d46530a
Sorry, but that's all that I'm up to at the moment. On the plus,
excepting the font_data file (which I've been skipping), up through
this file, I think that the code style is pretty close to uniform.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@345 7f0cb862-5218-0410-a997-914c9d46530a