*/
switch( event.type )
{
- case CreateNotify:
- /*
- * The window creation confirmation
- */
- break;
-
case DestroyNotify:
/*
* This is sent to confirm the XDestroyWindow call.
fghRedrawWindowByHandle( event.xexpose.window );
break;
+ /*
+ * CreateNotify causes a configure-event so that sub-windows are
+ * handled compatibly with GLUT.
+ *
+ * NOTE that it is possible that you will more than one Reshape
+ * event for your top-level window, but something like this appears
+ * to be required for compatbility.
+ *
+ * GLUT presumably does this because it generally tries to treat
+ * sub-windows the same as windows.
+ *
+ */
+ case CreateNotify:
case ConfigureNotify:
/*
* The window gets resized
SFG_Window *save_window = fgStructure.Window ;
SFG_Menu *save_menu = fgStructure.Menu ;
SFG_Window *parent_window = window->ActiveMenu->ParentWindow ;
- fgSetWindow ( window ) ;
+ fgSetWindow ( parent_window ) ;
fgStructure.Menu = window->ActiveMenu ;
/* Execute the menu callback */
SFG_Window *save_window = fgStructure.Window ;
SFG_Menu *save_menu = fgStructure.Menu ;
SFG_Window *parent_window = window->ActiveMenu->ParentWindow ;
- fgSetWindow ( window ) ;
+ fgSetWindow ( parent_window ) ;
fgStructure.Menu = window->ActiveMenu ;
/* Execute the menu callback */