Win32 glutIconifyWindow() patch contributed by John F. Fay
Restrict resize callbacks to visible windows When iconified via glutIconifyWindow(), don't pass (0,0) to resize callback Note that minimising the window via the menu or minimise button is not yet resolved. git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@443 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
c342b2fe2a
commit
b9b95cdc8c
@ -1214,11 +1214,16 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
|
||||
|
||||
case WM_SIZE:
|
||||
/*
|
||||
* We got resized... But check if the window has been already added...
|
||||
* If the window is visible, then it is the user manually resizing it.
|
||||
* If it is not, then it is the system sending us a dummy resize with
|
||||
* zero dimensions on a "glutIconifyWindow" call.
|
||||
*/
|
||||
if( window->State.Visible )
|
||||
{
|
||||
window->State.NeedToResize = GL_TRUE;
|
||||
window->State.Width = LOWORD(lParam);
|
||||
window->State.Height = HIWORD(lParam);
|
||||
}
|
||||
break;
|
||||
#if 0
|
||||
case WM_SETFOCUS:
|
||||
|
@ -719,6 +719,8 @@ void FGAPIENTRY glutIconifyWindow( void )
|
||||
freeglut_assert_ready;
|
||||
freeglut_assert_window;
|
||||
|
||||
fgStructure.Window->State.Visible = GL_FALSE;
|
||||
|
||||
#if TARGET_HOST_UNIX_X11
|
||||
|
||||
XIconifyWindow( fgDisplay.Display, fgStructure.Window->Window.Handle,
|
||||
|
Reference in New Issue
Block a user