Reworked the X11 part of glutSetCursor, fixing bug #764187 (Variable mouse
authorSven Panne <sven.panne@aedion.de>
Wed, 5 Jan 2005 13:11:30 +0000 (13:11 +0000)
committerSven Panne <sven.panne@aedion.de>
Wed, 5 Jan 2005 13:11:30 +0000 (13:11 +0000)
commitba21dbc1eca4d994466497da8a309ce1300e775f
tree7651d0b96aa32e41a3d7770c3e12e84e0b9bfc3f
parentf075b2126dff4d88bc2811281f0d27e7c0581ab4
Reworked the X11 part of glutSetCursor, fixing bug #764187 (Variable mouse
 pointers don't work) on the way:
   * Use slightly more compatible cursor shapes for GLUT_CURSOR_RIGHT_ARROW
     and GLUT_CURSOR_LEFT_ARROW.
   * Refactored and fixed the erroneous code for GLUT_CURSOR_NONE.
   * Removed the incorrect use of XFreeCursor and use a cache of cursors
     instead. Cursors are never freed now, we could do this e.g. via
     reference countig if this is really needed.
   * Fixed error handling.
   * Unknown cursor types are an error now.
   * Now the window state always corresponds to the wanted cursorID, even in
     the case of GLUT_CURSOR_FULL_CROSSHAIR.

NOTE: I am not sure where the cursor cache should really reside, currently it
is simply a file-local variable.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@560 7f0cb862-5218-0410-a997-914c9d46530a
ChangeLog
src/freeglut_cursor.c