Changed Create/ConfigureNotify handling in UNIX_X11:
* Just need to call GETWINDOW() once. Ooops. Heh. * Update {window->State} with the new size of the window. * If the window-size has NOT changed, then do NOT call the Reshape event. git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@377 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
1f312bc035
commit
60cc2c79ce
@ -573,7 +573,11 @@ void FGAPIENTRY glutMainLoopEvent( void )
|
|||||||
int width = event.xconfigure.width;
|
int width = event.xconfigure.width;
|
||||||
int height = event.xconfigure.height;
|
int height = event.xconfigure.height;
|
||||||
|
|
||||||
GETWINDOW( xconfigure );
|
if( ( width != window->State.Width ) ||
|
||||||
|
( height != window->State.Height ) )
|
||||||
|
{
|
||||||
|
window->State.Width = width;
|
||||||
|
window->State.Height = height;
|
||||||
if( FETCH_WCB( *window, Reshape ) )
|
if( FETCH_WCB( *window, Reshape ) )
|
||||||
INVOKE_WCB( *window, Reshape, ( width, height ) );
|
INVOKE_WCB( *window, Reshape, ( width, height ) );
|
||||||
else
|
else
|
||||||
@ -581,6 +585,8 @@ void FGAPIENTRY glutMainLoopEvent( void )
|
|||||||
fgSetWindow( window );
|
fgSetWindow( window );
|
||||||
glViewport( 0, 0, width, height );
|
glViewport( 0, 0, width, height );
|
||||||
}
|
}
|
||||||
|
glutPostRedisplay( );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user