X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_window.c;h=bef5dca5e417f248ae16bea85839526d163df14c;hb=9dac5d0710b760ba04ebb6bbe9ee61041232c700;hp=c0714aa5a3b76b7cf02489b9871fd2a29c42e076;hpb=006650e1dd72e73249d41e2bcea8b1668262a999;p=freeglut diff --git a/src/freeglut_window.c b/src/freeglut_window.c index c0714aa..bef5dca 100644 --- a/src/freeglut_window.c +++ b/src/freeglut_window.c @@ -87,9 +87,7 @@ XVisualInfo* fgChooseVisual( void ) int attributes[ 32 ]; int where = 0; - /* - * First we have to process the display mode settings... - */ + /* First we have to process the display mode settings... */ /* * XXX Why is there a semi-colon in this #define? The code * XXX that uses the macro seems to always add more semicolons... @@ -133,9 +131,7 @@ XVisualInfo* fgChooseVisual( void ) ATTRIB_VAL( GLX_ACCUM_ALPHA_SIZE, 1 ); } - /* - * Push a null at the end of the list - */ + /* Push a null at the end of the list */ ATTRIB( None ); if( ! wantIndexedMode ) @@ -186,9 +182,7 @@ GLboolean fgSetupPixelFormat( SFG_Window* window, GLboolean checkOnly, #pragma message( "fgSetupPixelFormat(): there is still some work to do here!" ) #endif - /* - * Specify which pixel format do we opt for... - */ + /* Specify which pixel format do we opt for... */ pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR); pfd.nVersion = 1; pfd.dwFlags = flags; @@ -342,7 +336,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; @@ -725,7 +719,7 @@ void FGAPIENTRY glutSetWindow( int ID ) window = fgWindowByID( ID ); if( window == NULL ) { - fgWarning( "glutSetWindow(): window ID %i not found!", ID ); + fgWarning( "glutSetWindow(): window ID %d not found!", ID ); return; } @@ -749,7 +743,7 @@ int FGAPIENTRY glutGetWindow( void ) void FGAPIENTRY glutShowWindow( void ) { freeglut_assert_ready; - freeglut_assert_window; + FREEGLUT_EXIT_IF_NO_WINDOW ( "glutShowWindow" ); #if TARGET_HOST_UNIX_X11 @@ -771,7 +765,7 @@ void FGAPIENTRY glutShowWindow( void ) void FGAPIENTRY glutHideWindow( void ) { freeglut_assert_ready; - freeglut_assert_window; + FREEGLUT_EXIT_IF_NO_WINDOW ( "glutHideWindow" ); #if TARGET_HOST_UNIX_X11 @@ -799,7 +793,7 @@ void FGAPIENTRY glutHideWindow( void ) void FGAPIENTRY glutIconifyWindow( void ) { freeglut_assert_ready; - freeglut_assert_window; + FREEGLUT_EXIT_IF_NO_WINDOW ( "glutIconifyWindow" ); fgStructure.Window->State.Visible = GL_FALSE; #if TARGET_HOST_UNIX_X11 @@ -823,7 +817,7 @@ void FGAPIENTRY glutIconifyWindow( void ) void FGAPIENTRY glutSetWindowTitle( const char* title ) { freeglut_assert_ready; - freeglut_assert_window; + FREEGLUT_EXIT_IF_NO_WINDOW ( "glutSetWindowTitle" ); if( ! fgStructure.Window->Parent ) { #if TARGET_HOST_UNIX_X11 @@ -865,7 +859,7 @@ void FGAPIENTRY glutSetWindowTitle( const char* title ) void FGAPIENTRY glutSetIconTitle( const char* title ) { freeglut_assert_ready; - freeglut_assert_window; + FREEGLUT_EXIT_IF_NO_WINDOW ( "glutSetIconTitle" ); if( ! fgStructure.Window->Parent ) { @@ -908,7 +902,7 @@ void FGAPIENTRY glutSetIconTitle( const char* title ) void FGAPIENTRY glutReshapeWindow( int width, int height ) { freeglut_assert_ready; - freeglut_assert_window; + FREEGLUT_EXIT_IF_NO_WINDOW ( "glutReshapeWindow" ); fgStructure.Window->State.NeedToResize = GL_TRUE; fgStructure.Window->State.Width = width ; @@ -921,7 +915,7 @@ void FGAPIENTRY glutReshapeWindow( int width, int height ) void FGAPIENTRY glutPositionWindow( int x, int y ) { freeglut_assert_ready; - freeglut_assert_window; + FREEGLUT_EXIT_IF_NO_WINDOW ( "glutPositionWindow" ); #if TARGET_HOST_UNIX_X11 @@ -955,7 +949,7 @@ void FGAPIENTRY glutPositionWindow( int x, int y ) void FGAPIENTRY glutPushWindow( void ) { freeglut_assert_ready; - freeglut_assert_window; + FREEGLUT_EXIT_IF_NO_WINDOW ( "glutPushWindow" ); #if TARGET_HOST_UNIX_X11 @@ -979,7 +973,7 @@ void FGAPIENTRY glutPushWindow( void ) void FGAPIENTRY glutPopWindow( void ) { freeglut_assert_ready; - freeglut_assert_window; + FREEGLUT_EXIT_IF_NO_WINDOW ( "glutPopWindow" ); #if TARGET_HOST_UNIX_X11 @@ -1003,7 +997,7 @@ void FGAPIENTRY glutPopWindow( void ) void FGAPIENTRY glutFullScreen( void ) { freeglut_assert_ready; - freeglut_assert_window; + FREEGLUT_EXIT_IF_NO_WINDOW ( "glutFullScreen" ); { #if TARGET_HOST_UNIX_X11