From: Sven Panne Date: Wed, 5 Jan 2005 14:28:22 +0000 (+0000) Subject: Hopefully removed all damage done by commits without merge X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;h=fe9c7405acbc1f305a01f7e123e6c70070934ae8;p=freeglut Hopefully removed all damage done by commits without merge git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@561 7f0cb862-5218-0410-a997-914c9d46530a --- diff --git a/src/freeglut_ext.c b/src/freeglut_ext.c index ff13adc..7278b34 100644 --- a/src/freeglut_ext.c +++ b/src/freeglut_ext.c @@ -172,8 +172,10 @@ static struct name_address_pair glut_functions[] = { "glutStrokeString", (void *) glutStrokeString }, { "glutWireRhombicDodecahedron", (void *) glutWireRhombicDodecahedron }, { "glutSolidRhombicDodecahedron", (void *) glutSolidRhombicDodecahedron }, - { "glutWireSierpinskiSponge ", (void *) glutWireSierpinskiSponge }, - { "glutSolidSierpinskiSponge ", (void *) glutSolidSierpinskiSponge }, + { "glutWireSierpinskiSponge", (void *) glutWireSierpinskiSponge }, + { "glutSolidSierpinskiSponge", (void *) glutSolidSierpinskiSponge }, + { "glutWireCylinder", (void *) glutWireCylinder }, + { "glutSolidCylinder", (void *) glutSolidCylinder }, { "glutGetProcAddress", (void *) glutGetProcAddress }, { "glutMouseWheelFunc", (void *) glutMouseWheelFunc }, { NULL, NULL } diff --git a/src/freeglut_font.c b/src/freeglut_font.c index 9a99f46..b163f6e 100644 --- a/src/freeglut_font.c +++ b/src/freeglut_font.c @@ -153,7 +153,7 @@ void FGAPIENTRY glutBitmapString( void* fontID, const unsigned char *string ) * point back to the start of the line and down one line. */ while( ( c = *string++) ) - if( string[c] == '\n' ) + if( c == '\n' ) { glBitmap ( 0, 0, 0, 0, -x, (float) -font->Height, NULL ); x = 0.0f; diff --git a/src/freeglut_main.c b/src/freeglut_main.c index d1ba612..4763411 100644 --- a/src/freeglut_main.c +++ b/src/freeglut_main.c @@ -487,7 +487,7 @@ static void fghSleepForEvents( void ) wait.tv_usec = (msec % 1000) * 1000; err = select( socket+1, &fdset, NULL, NULL, &wait ); - if( -1 == err ) + if( ( -1 == err ) && ( errno != EINTR ) ) fgWarning ( "freeglut select() error: %d", errno ); } #elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE diff --git a/src/freeglut_state.c b/src/freeglut_state.c index 62d4f89..c972713 100644 --- a/src/freeglut_state.c +++ b/src/freeglut_state.c @@ -555,8 +555,7 @@ int FGAPIENTRY glutDeviceGet( GLenum eWhat ) return fgStructure.Window ? fgStructure.Window->State.IgnoreKeyRepeat : 0; case GLUT_DEVICE_KEY_REPEAT: - /* XXX WARNING: THIS IS A BIG LIE! */ - return GLUT_KEY_REPEAT_DEFAULT; + return fgState.KeyRepeat; default: fgWarning( "glutDeviceGet(): missing enum handle %d", eWhat ); diff --git a/src/freeglut_window.c b/src/freeglut_window.c index 3815716..77f2594 100644 --- a/src/freeglut_window.c +++ b/src/freeglut_window.c @@ -316,7 +316,7 @@ void fgOpenWindow( SFG_Window* window, const char* title, */ winAttr.event_mask = StructureNotifyMask | SubstructureNotifyMask | ExposureMask | - ButtonPressMask | ButtonReleaseMask | KeyPressMask | KeyRelease | + ButtonPressMask | ButtonReleaseMask | KeyPressMask | KeyReleaseMask | VisibilityChangeMask | EnterWindowMask | LeaveWindowMask | PointerMotionMask | ButtonMotionMask; winAttr.background_pixmap = None; @@ -401,12 +401,6 @@ void fgOpenWindow( SFG_Window* window, const char* title, } #endif - glXMakeCurrent( - fgDisplay.Display, - window->Window.Handle, - window->Window.Context - ); - /* * XXX Assume the new window is visible by default * XXX Is this a safe assumption? @@ -452,6 +446,12 @@ void fgOpenWindow( SFG_Window* window, const char* title, XSetWMProtocols( fgDisplay.Display, window->Window.Handle, &fgDisplay.DeleteWindow, 1 ); + glXMakeCurrent( + fgDisplay.Display, + window->Window.Handle, + window->Window.Context + ); + XMapWindow( fgDisplay.Display, window->Window.Handle ); #elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE