Corrected a bug w.r.t. display and joystick events. When getting ready
authorRichard Rauch <rkr@olib.org>
Wed, 24 Sep 2003 06:26:36 +0000 (06:26 +0000)
committerRichard Rauch <rkr@olib.org>
Wed, 24 Sep 2003 06:26:36 +0000 (06:26 +0000)
to sleep, we need to go through ALL windows to check for pending joysticks
and to check for pending redisplays.  I was just going through all TOP-
LEVEL windows.  Eeek.  This won't do.

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

src/freeglut_main.c

index 0c90e21..21daa87 100644 (file)
@@ -445,6 +445,7 @@ static void fgCheckJoystickCallback( SFG_Window* w, SFG_Enumerator* e)
        e->found = TRUE;
        e->data = w;
     }
+    fgEnumSubWindows( w, fgCheckJoystickCallback, e );
 }
 static int fgHaveJoystick( void )
 {
@@ -461,6 +462,7 @@ static void fgHavePendingRedisplaysCallback( SFG_Window* w, SFG_Enumerator* e)
        e->found = TRUE;
        e->data = w;
     }
+    fgEnumSubWindows( w, fgHavePendingRedisplaysCallback, e );
 }      
 static int fgHavePendingRedisplays (void)
 {