Noted by XXX comments that the XFlush() calls probably shouldn't be there.

Flushing the X protocol stack every little bit both adds clutter to the
code and may impede performance.

It seems that we should be able to get rid of these, though
allowing client code to directly call glutMainLoopEvent() does make it
a little more complicated.

Something to ponder.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@279 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
rkrolib 2003-10-31 11:25:23 +00:00
parent a92096db1a
commit d1bfaa5c4b

View File

@ -553,7 +553,7 @@ void fgCloseWindow( SFG_Window* window )
glXDestroyContext( fgDisplay.Display, window->Window.Context );
XDestroyWindow( fgDisplay.Display, window->Window.Handle );
XFlush( fgDisplay.Display );
XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
#elif TARGET_HOST_WIN32
@ -652,7 +652,7 @@ void FGAPIENTRY glutShowWindow( void )
#if TARGET_HOST_UNIX_X11
XMapWindow( fgDisplay.Display, fgStructure.Window->Window.Handle );
XFlush( fgDisplay.Display );
XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
#elif TARGET_HOST_WIN32
@ -678,7 +678,7 @@ void FGAPIENTRY glutHideWindow( void )
fgDisplay.Screen );
else
XUnmapWindow( fgDisplay.Display, fgStructure.Window->Window.Handle );
XFlush( fgDisplay.Display );
XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
#elif TARGET_HOST_WIN32
@ -701,7 +701,7 @@ void FGAPIENTRY glutIconifyWindow( void )
XIconifyWindow( fgDisplay.Display, fgStructure.Window->Window.Handle,
fgDisplay.Screen );
XFlush( fgDisplay.Display );
XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
#elif TARGET_HOST_WIN32
@ -738,7 +738,7 @@ void FGAPIENTRY glutSetWindowTitle( const char* title )
&text
);
XFlush( fgDisplay.Display );
XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
}
#elif TARGET_HOST_WIN32
@ -776,7 +776,7 @@ void FGAPIENTRY glutSetIconTitle( const char* title )
&text
);
XFlush( fgDisplay.Display );
XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
}
#elif TARGET_HOST_WIN32
@ -799,7 +799,7 @@ void FGAPIENTRY glutReshapeWindow( int width, int height )
XResizeWindow( fgDisplay.Display, fgStructure.Window->Window.Handle,
width, height );
XFlush( fgDisplay.Display );
XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
#elif TARGET_HOST_WIN32
@ -858,7 +858,7 @@ void FGAPIENTRY glutPositionWindow( int x, int y )
#if TARGET_HOST_UNIX_X11
XMoveWindow( fgDisplay.Display, fgStructure.Window->Window.Handle, x, y );
XFlush( fgDisplay.Display );
XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
#elif TARGET_HOST_WIN32
@ -950,7 +950,7 @@ void FGAPIENTRY glutFullScreen( void )
fgDisplay.ScreenWidth,
fgDisplay.ScreenHeight
);
XFlush( fgDisplay.Display );
XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
XTranslateCoordinates(
fgDisplay.Display,
@ -966,7 +966,7 @@ void FGAPIENTRY glutFullScreen( void )
fgStructure.Window->Window.Handle,
-x, -y
);
XFlush( fgDisplay.Display );
XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
}
}
#elif TARGET_HOST_WIN32