{
int Width; /* Window's width in pixels */
int Height; /* The same about the height */
+ int OldWidth; /* Window width from before a resize */
+ int OldHeight; /* " height " " " " */
GLboolean Redisplay; /* Do we have to redisplay? */
GLboolean Visible; /* Is the window visible now */
* (in freeglut only) will not get an initial reshape event,
* which can break things.
*
- * XXX NOTE that it is possible that you will more than one Reshape
- * XXX event for your top-level window, but something like this
- * XXX appears to be required for compatbility.
- *
* GLUT presumably does this because it generally tries to treat
* sub-windows the same as windows.
*/
int width = event.xconfigure.width;
int height = event.xconfigure.height;
- if( ( width != window->State.Width ) ||
- ( height != window->State.Height ) )
+ if( ( width != window->State.OldWidth ) ||
+ ( height != window->State.OldHeight ) )
{
- window->State.Width = width;
- window->State.Height = height;
+ window->State.OldWidth = width;
+ window->State.OldHeight = height;
if( FETCH_WCB( *window, Reshape ) )
INVOKE_WCB( *window, Reshape, ( width, height ) );
else
parent = fgWindowByID( parentID );
freeglut_return_val_if_fail( parent != NULL, 0 );
window = fgCreateWindow( parent, "", x, y, w, h, GL_FALSE, GL_FALSE );
+ window->State.OldHeight = window->State.OldWidth = -1;
return window->ID;
}