When a window is iconified, only an UnmapNotify is sent, not a

VisibilityNotify, so we have to handle the window status callback in the
former case, too. This fixes bug #763442 (Call the visibility callback when
minimizing a window).


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@649 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
spanne 2005-06-30 14:35:29 +00:00
parent 49d5acfd00
commit a7b1f61d79
2 changed files with 14 additions and 5 deletions

View File

@ -1064,3 +1064,8 @@ to crash if it called the code with a negative number of levels
event tracing, but in the future we could add more. event tracing, but in the future we could add more.
(275) Cleaned up CreateNotify/ConfigureNotify handling. (275) Cleaned up CreateNotify/ConfigureNotify handling.
(276) When a window is iconified, only an UnmapNotify is sent, not a
VisibilityNotify, so we have to handle the window status callback in the
former case, too. This fixes bug #763442 (Call the visibility callback when
minimizing a window).

View File

@ -1080,11 +1080,13 @@ void FGAPIENTRY glutMainLoopEvent( void )
break; break;
case MapNotify: case MapNotify:
break;
case UnmapNotify: case UnmapNotify:
/* /* We get this when iconifying a window. */
* If we never do anything with this, can we just not ask to GETWINDOW( xunmap );
* get these messages? INVOKE_WCB( *window, WindowStatus, ( GLUT_HIDDEN ) );
*/ window->State.Visible = GL_FALSE;
break; break;
case MappingNotify: case MappingNotify:
@ -1109,7 +1111,9 @@ void FGAPIENTRY glutMainLoopEvent( void )
* Sending this event, the X server can notify us that the window * Sending this event, the X server can notify us that the window
* has just acquired one of the three possible visibility states: * has just acquired one of the three possible visibility states:
* VisibilityUnobscured, VisibilityPartiallyObscured or * VisibilityUnobscured, VisibilityPartiallyObscured or
* VisibilityFullyObscured * VisibilityFullyObscured. Note that we DO NOT receive a
* VisibilityNotify event when iconifying a window, we only get an
* UnmapNotify then.
*/ */
switch( event.xvisibility.state ) switch( event.xvisibility.state )
{ {