+ * CreateNotify causes a configure-event so that sub-windows are
+ * handled compatibly with GLUT. Otherwise, your sub-windows
+ * (in freeglut only) will not get an initial reshape event,
+ * which can break things.
+ *
+ * XXX NOTE that it is possible that you will more than one Reshape
+ * XXX event for your top-level window, but something like this
+ * XXX 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:
+ GETWINDOW( xconfigure );
+ {
+ int width = event.xconfigure.width;
+ int height = event.xconfigure.height;
+
+ GETWINDOW( xconfigure );
+ if( FETCH_WCB( *window, Reshape ) )
+ INVOKE_WCB( *window, Reshape, ( width, height ) );
+ else
+ {
+ fgSetWindow( window );
+ glViewport( 0, 0, width, height );
+ }
+ }
+ break;
+
+ case DestroyNotify:
+ /*
+ * This is sent to confirm the XDestroyWindow call.
+ * XXX WHY is this commented out? Should we re-enable it?