In FlightGear you can use the right mouse button to
toggle beween usual mouse pointer, small crosshair and
a bidirectional <-> pointer. This bidirectional
pointers does not get shown, I see the 'simple' pointer
Logged In: YES
This should almost all be fixed in the UNIX/X11 side
3 or 4 BSDs and the hundreds of GNU/LINUXes).
Excepting the "invisible" (GLUT_CURSOR_NONE, or some such)
cursor, I think that cursors in freeglut/X11 look like they
do in GLUT/X11.
I cannot comment on the MS-WINDOWS side, other than that it
is obviously incomplete. I have never run FlightGear (it
doesn't sound very promising without hardware acceleration),
so I can't comment on how it works.
I think that this is FULLY fixed under UNIX_X11, now. The
holdout was GLUT_CURSOR_NONE, for which we had to generate
an internal 16x16 Pixmap image of nothing. It took me a
while to get nothing to stand still for my digital camera,
but we're cool, now.
There is a subtle issue about the UNIX_X11 cursor: The
default "system" pointer is a left-pointing arrow. The
freeglut "left arrow" points more upwards than the "system"
cursor. I'm not sure if old GLUT had this issue or not.
Since the "system" one is basically GLUT_INHERIT from the
root window, this is arguably a feature (and in any case not
really an issue for us to get too worked up over). Still,
it's worth mentioning.
WIN32 still has very skimpy cursor support.
Logged In: YES
This has been fixed now for X11, Win32 should probably handled
completely differently, so I'll leave this bug open for now.
On X11, it's been fixed for over a year. (^&
There were some newer patches for WIN32 that solved a
little bit more of the WIN32 side. I don't know if those
ever got into freeglut, but I applied them to OpenGLUT
some ways back.
Ah, I see now that you *have* made some changes. THe
anoncvs views don't update instantly, so I thought that
you were referring to this bug report.
The old code did work correctly, but the error-checking
was indeed bogus. The idea of modularizing the code
a little more was also a plus. I might have done the
work in separate commits to facilitate perusing the
CVS history. (^&
I've incorporated the changes, except the cache, into my
own derivative library. It's nice to see changes flowing out
of freeglut for a change, rather than in. Keep up the good
(I'm unsure about incorporating the cache. Since I am
planning on renumbering the cursor IDs (all symbolic
constants should have different values, if possible), the
cache needs to be reworked a little. The benefit of not
having to set up a new cursor over the connection each time
it the cursor is changed would be valuable in some corner
cases, but I'm not sure how many applications would really
care about that...)
I don't think that the old code was correct: If I read the X11 specs
correctly, using a cursor after freeing it with XFreeCursor() is not
OK. So for me the cache seemed to be the easiest way to avoid
creating/freeing cursors over and over again when e.g. a mouse
crosses a window's border repeatedly. I guess that a 2-3 element
cache would be sufficient, but simply caching all cursors is easier.
About renumbering anything in the headers: This would
immediately break binary compatibility, so this should *not* be
done for freeglut. It's OK for OpenGLUT, it is not binary compatible
anymore anyway (e.g. font handling).
I don't have the X specs in hand. However, in the O'Reilly
XLib book, section 4.3.10 includes:
"The cursor resource can be freed with XFreeCursor() when no
further explicit references to it are to be made."
Since the code recreates the cursor everytime it was set,
freeing it seems appropriate to me. (The fact that X
maintains an implicit reference to it is not a problem.
As I understand it, X keeps a reference count and will not
actually free the memory until its internal references are
Maybe I am misunderstanding the intent of the documentation,
however. Can you say more specifically why you think it was
not okay to free the cursor?
Thanks for any insight that you can share.
John F. Fay
Logged In: YES
The Windows cursor support is about as good as it is going
to get without "freeglut" implementing its own cursors
completely. I propose to say "good enough" and close this.