From: Richard Rauch Date: Wed, 24 Sep 2003 06:26:36 +0000 (+0000) Subject: Corrected a bug w.r.t. display and joystick events. When getting ready X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;h=3b716800fb08b911a3383a9d2bd01562ff30207b;p=freeglut Corrected a bug w.r.t. display and joystick events. When getting ready 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 --- diff --git a/src/freeglut_main.c b/src/freeglut_main.c index 0c90e21..21daa87 100644 --- a/src/freeglut_main.c +++ b/src/freeglut_main.c @@ -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) {