This is done so that subwindows on X11 will get "resize" events when
they are created. Old GLUT did this---presumably by design in order
to ensure that (a) All windows get notified of their size as soon as
the window exists, and (b) probably more importantly, so that windows
and sub-windows behave as much alike as possible. I believe that GLUT
was right to do this, and I believe that compatibility requires this
(I have a sample program that breaks in freeglut but not GLUT without
this fix).
I did not touch the Microsoft side, because I don't know what their
OS does---nor if old GLUT was historically system-dependant about this.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@217
7f0cb862-5218-0410-a997-
914c9d46530a
*/
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