X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_cursor.c;h=390e0cbf81b7c4b27b691392a9def619ca81a89c;hb=a14928fc505633d395e18db84ce7dbfd7386fa5f;hp=5542a2d45e6d68f10645b6f0682539052f35bda5;hpb=7110b3c08fb65671279c5b643134c335a5200d5e;p=freeglut diff --git a/src/freeglut_cursor.c b/src/freeglut_cursor.c index 5542a2d..390e0cb 100644 --- a/src/freeglut_cursor.c +++ b/src/freeglut_cursor.c @@ -28,7 +28,7 @@ #include #include "freeglut_internal.h" -#if TARGET_HOST_UNIX_X11 +#if TARGET_HOST_POSIX_X11 #include #endif @@ -43,7 +43,7 @@ /* -- PRIVATE FUNCTIONS --------------------------------------------------- */ -#if TARGET_HOST_UNIX_X11 +#if TARGET_HOST_POSIX_X11 /* * A factory method for an empty cursor */ @@ -111,7 +111,7 @@ static cursorCacheEntry cursorCache[] = { */ void fgSetCursor ( SFG_Window *window, int cursorID ) { -#if TARGET_HOST_UNIX_X11 +#if TARGET_HOST_POSIX_X11 { Cursor cursor; /* @@ -147,19 +147,19 @@ 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 +#elif TARGET_HOST_MS_WINDOWS /* - * This is a temporary solution only... + * Joe Krahn is re-writing the following code. */ /* Set the cursor AND change it for this window class. */ # define MAP_CURSOR(a,b) \ @@ -234,7 +234,7 @@ void FGAPIENTRY glutWarpPointer( int x, int y ) FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutWarpPointer" ); FREEGLUT_EXIT_IF_NO_WINDOW ( "glutWarpPointer" ); -#if TARGET_HOST_UNIX_X11 +#if TARGET_HOST_POSIX_X11 XWarpPointer( fgDisplay.Display, @@ -246,7 +246,7 @@ void FGAPIENTRY glutWarpPointer( int x, int y ) /* Make the warp visible immediately. */ XFlush( fgDisplay.Display ); -#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE +#elif TARGET_HOST_MS_WINDOWS { POINT coords;