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