From ee2538944665207b17b1ae3fae0233f0dc687a7d Mon Sep 17 00:00:00 2001 From: spanne Date: Thu, 14 Jul 2005 09:39:26 +0000 Subject: [PATCH] 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 --- freeglut/freeglut/ChangeLog | 2 ++ freeglut/freeglut/src/freeglut_cursor.c | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/freeglut/freeglut/ChangeLog b/freeglut/freeglut/ChangeLog index e28f1e6..77eecdc 100644 --- a/freeglut/freeglut/ChangeLog +++ b/freeglut/freeglut/ChangeLog @@ -1126,3 +1126,5 @@ for some bit-fiddling, anyway. (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. + +(294) Fixed the GLUT_CURSOR_INHERIT logic once again... diff --git a/freeglut/freeglut/src/freeglut_cursor.c b/freeglut/freeglut/src/freeglut_cursor.c index 5542a2d..66ed155 100644 --- a/freeglut/freeglut/src/freeglut_cursor.c +++ b/freeglut/freeglut/src/freeglut_cursor.c @@ -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 ); - 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" ); - else - XDefineCursor( fgDisplay.Display, - window->Window.Handle, cursor ); + } } #elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE