X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=freeglut-1.3%2Ffreeglut_cursor.c;h=53ce7501c98d90938725a85a9334aee64100d6c1;hb=19ac41b4392cee221c884511c0495d9d425a381e;hp=900e1c9ad44ce7f6ddc196db3bea82b1cdbd87a7;hpb=c90e3f21e02020232054f78029ef9071c7359cfb;p=freeglut diff --git a/freeglut-1.3/freeglut_cursor.c b/freeglut-1.3/freeglut_cursor.c index 900e1c9..53ce750 100644 --- a/freeglut-1.3/freeglut_cursor.c +++ b/freeglut-1.3/freeglut_cursor.c @@ -43,7 +43,6 @@ * * fgDisplayCursor() -- this waits for better times * glutSetCursor() -- both X and Win32 mappings are incomplete - * glutWarpPointer() -- check the Win32 version * * It would be good to use custom mouse cursor shapes, and introduce * an option to display them using glBitmap() and/or texture mapping, @@ -112,7 +111,14 @@ void FGAPIENTRY glutSetCursor( int cursorID ) /* * This is a temporary solution only... */ -# define MAP_CURSOR(a,b) case a: SetCursor( LoadCursor( NULL, b ) ); break; + // Set the cursor AND change it for this window class. +# define MAP_CURSOR(a,b) case a: SetCursor( LoadCursor( NULL, b ) ); \ + SetClassLong(fgStructure.Window->Window.Handle,GCL_HCURSOR,(LONG)LoadCursor(NULL,b)); \ + break; + // Nuke the cursor AND change it for this window class. +# define ZAP_CURSOR(a,b) case a: SetCursor( NULL ); \ + SetClassLong(fgStructure.Window->Window.Handle,GCL_HCURSOR,(LONG)NULL); \ + break; switch( cursorID ) { @@ -126,10 +132,11 @@ void FGAPIENTRY glutSetCursor( int cursorID ) MAP_CURSOR( GLUT_CURSOR_WAIT, IDC_WAIT ); MAP_CURSOR( GLUT_CURSOR_TEXT, IDC_UPARROW ); MAP_CURSOR( GLUT_CURSOR_CROSSHAIR, IDC_CROSS ); - MAP_CURSOR( GLUT_CURSOR_NONE, IDC_NO ); + //MAP_CURSOR( GLUT_CURSOR_NONE, IDC_NO ); + ZAP_CURSOR( GLUT_CURSOR_NONE, NULL ); default: - MAP_CURSOR( GLUT_CURSOR_UP_DOWN, IDC_UPARROW ); + MAP_CURSOR( GLUT_CURSOR_UP_DOWN, IDC_ARROW ); } #endif