Fixed the GLUT_CURSOR_INHERIT logic once again...

Note that this commit is untested, but at least it looks better than
before. We really a need a cursor test program.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@678 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
spanne 2005-07-14 09:39:26 +00:00
parent 322a290199
commit ee25389446
2 changed files with 7 additions and 5 deletions

View File

@ -1126,3 +1126,5 @@ for some bit-fiddling, anyway.
(293) Improve autoconf magic: To detect headers like GL/gl.h, it might be (293) Improve autoconf magic: To detect headers like GL/gl.h, it might be
necessary to temporarily use the X11 flags found by AC_PATH_XTRA. necessary to temporarily use the X11 flags found by AC_PATH_XTRA.
(294) Fixed the GLUT_CURSOR_INHERIT logic once again...

View File

@ -147,13 +147,13 @@ void fgSetCursor ( SFG_Window *window, int cursorID )
} }
} }
if ( cursorIDToUse == GLUT_CURSOR_INHERIT ) if ( cursorIDToUse == GLUT_CURSOR_INHERIT ) {
XUndefineCursor( fgDisplay.Display, window->Window.Handle ); XUndefineCursor( fgDisplay.Display, window->Window.Handle );
if ( ( cursorIDToUse != GLUT_CURSOR_NONE ) && ( cursor == None ) ) } else if ( cursor != None ) {
XDefineCursor( fgDisplay.Display, window->Window.Handle, cursor );
} else if ( cursorIDToUse != GLUT_CURSOR_NONE ) {
fgError( "Failed to create cursor" ); fgError( "Failed to create cursor" );
else }
XDefineCursor( fgDisplay.Display,
window->Window.Handle, cursor );
} }
#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE #elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE