From: John F. Fay Date: Wed, 13 Jul 2005 20:25:07 +0000 (+0000) Subject: Fixing a cursor bug in \"GLUT_CURSOR_INHERIT\" X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;h=7110b3c08fb65671279c5b643134c335a5200d5e;p=freeglut Fixing a cursor bug in \"GLUT_CURSOR_INHERIT\" git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@677 7f0cb862-5218-0410-a997-914c9d46530a --- diff --git a/src/freeglut_cursor.c b/src/freeglut_cursor.c index d32ba5c..5542a2d 100644 --- a/src/freeglut_cursor.c +++ b/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