Pure code janitoring: Shuffled the order of some of the case statements
authorRichard Rauch <rkr@olib.org>
Fri, 7 Nov 2003 10:32:38 +0000 (10:32 +0000)
committerRichard Rauch <rkr@olib.org>
Fri, 7 Nov 2003 10:32:38 +0000 (10:32 +0000)
in the UNIX_X11 X event processing loop.  (In general, it's nice to have
case statements sorted, especially when you have a *huge* switch statement
like this.  That makes it easier to find the one that you're looking for,
and to see if a certain case is defined...)

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@320 7f0cb862-5218-0410-a997-914c9d46530a

src/freeglut_main.c

index fb8f9bb..4ec74f8 100644 (file)
@@ -508,14 +508,6 @@ void FGAPIENTRY glutMainLoopEvent( void )
 
         switch( event.type )
         {
-        case DestroyNotify:
-            /*
-             * This is sent to confirm the XDestroyWindow call.
-             * XXX WHY is this commented out?  Should we re-enable it?
-             */
-            /* fgAddToWindowDestroyList ( window, FALSE ); */
-            break;
-
         case ClientMessage:
             /*
              * Destroy the window when the WM_DELETE_WINDOW message arrives
@@ -529,26 +521,6 @@ void FGAPIENTRY glutMainLoopEvent( void )
             }
             break;
 
-        case MapNotify:
-        case UnmapNotify:
-            /*
-             * If we never do anything with this, can we just not ask to
-             * get these messages?
-             */
-            break;
-
-        case Expose:
-            /*
-             * We are too dumb to process partial exposes...
-             * XXX Well, we could do it.  However, it seems to only
-             * XXX be potentially useful for single-buffered (since
-             * XXX double-buffered does not respect viewport when we
-             * XXX do a buffer-swap).
-             */
-            if( event.xexpose.count == 0 )
-                fghRedrawWindowByHandle( event.xexpose.window );
-            break;
-
             /*
              * CreateNotify causes a configure-event so that sub-windows are
              * handled compatibly with GLUT.  Otherwise, your sub-windows
@@ -571,6 +543,34 @@ void FGAPIENTRY glutMainLoopEvent( void )
             );
             break;
 
+        case DestroyNotify:
+            /*
+             * This is sent to confirm the XDestroyWindow call.
+             * XXX WHY is this commented out?  Should we re-enable it?
+             */
+            /* fgAddToWindowDestroyList ( window, FALSE ); */
+            break;
+
+        case Expose:
+            /*
+             * We are too dumb to process partial exposes...
+             * XXX Well, we could do it.  However, it seems to only
+             * XXX be potentially useful for single-buffered (since
+             * XXX double-buffered does not respect viewport when we
+             * XXX do a buffer-swap).
+             */
+            if( event.xexpose.count == 0 )
+                fghRedrawWindowByHandle( event.xexpose.window );
+            break;
+
+        case MapNotify:
+        case UnmapNotify:
+            /*
+             * If we never do anything with this, can we just not ask to
+             * get these messages?
+             */
+            break;
+
         case MappingNotify:
             /*
              * Have the client's keyboard knowledge updated (xlib.ps,