on windows too: call resize callback only in response to WM message
(yes, on both platform we now don't have an initial resize callback call, it'll be back later) git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1559 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
9ae70d72c7
commit
7d4a63d970
@ -74,8 +74,6 @@ static void fghReshapeWindow ( SFG_Window *window, int width, int height )
|
|||||||
|
|
||||||
fgPlatformReshapeWindow ( window, width, height );
|
fgPlatformReshapeWindow ( window, width, height );
|
||||||
|
|
||||||
INVOKE_WCB( *window, Reshape, ( width, height ) );
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Force a window redraw. In Windows at least this is only a partial
|
* Force a window redraw. In Windows at least this is only a partial
|
||||||
* solution: if the window is increasing in size in either dimension,
|
* solution: if the window is increasing in size in either dimension,
|
||||||
|
@ -506,8 +506,15 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPAR
|
|||||||
#endif /* defined(_WIN32_WCE) */
|
#endif /* defined(_WIN32_WCE) */
|
||||||
|
|
||||||
if (width!=window->State.Width || height!=window->State.Height)
|
if (width!=window->State.Width || height!=window->State.Height)
|
||||||
/* Something changed, need to resize */
|
{
|
||||||
window->State.NeedToResize = GL_TRUE;
|
SFG_Window* saved_window = fgStructure.CurrentWindow;
|
||||||
|
|
||||||
|
/* size changed, call reshape callback */
|
||||||
|
INVOKE_WCB( *window, Reshape, ( width, height ) );
|
||||||
|
glutPostRedisplay( );
|
||||||
|
if( window->IsMenu )
|
||||||
|
fgSetWindow( saved_window );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* according to docs, should return 0 */
|
/* according to docs, should return 0 */
|
||||||
|
Reference in New Issue
Block a user