diff --git a/freeglut/freeglut/src/freeglut_cursor.c b/freeglut/freeglut/src/freeglut_cursor.c index d32ba5c..5542a2d 100644 --- a/freeglut/freeglut/src/freeglut_cursor.c +++ b/freeglut/freeglut/src/freeglut_cursor.c @@ -147,11 +147,13 @@ void fgSetCursor ( SFG_Window *window, int cursorID ) } } - if ( ( cursorIDToUse != GLUT_CURSOR_NONE ) && ( cursor == None ) ) { + if ( cursorIDToUse == GLUT_CURSOR_INHERIT ) + XUndefineCursor( fgDisplay.Display, window->Window.Handle ); + if ( ( cursorIDToUse != GLUT_CURSOR_NONE ) && ( cursor == None ) ) fgError( "Failed to create cursor" ); - } - XDefineCursor( fgDisplay.Display, - window->Window.Handle, cursor ); + else + XDefineCursor( fgDisplay.Display, + window->Window.Handle, cursor ); } #elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE