diff options
author | Jouk <joukj@tarantella.(none)> | 2007-07-25 10:16:11 +0200 |
---|---|---|
committer | Jouk <joukj@tarantella.(none)> | 2007-07-25 10:16:11 +0200 |
commit | eb9a5b6d5127858b01ec12672c999e7d25cd7aed (patch) | |
tree | 91c0302c4d007ddcd0c42fbb8d8de71bf23d3914 /src/glut/directfb/events.c | |
parent | 55f8b7053065ce88296608071feed6f9540f6c0d (diff) | |
parent | 03ec41ddc51e539c989a546f33d22daa2af69095 (diff) |
Merge branch 'master' of git+ssh://[email protected]/git/mesa/mesa
Diffstat (limited to 'src/glut/directfb/events.c')
-rw-r--r-- | src/glut/directfb/events.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/glut/directfb/events.c b/src/glut/directfb/events.c index 4c474710abe..6ebdd166ac8 100644 --- a/src/glut/directfb/events.c +++ b/src/glut/directfb/events.c @@ -435,13 +435,14 @@ glutMainLoop( void ) { __glutAssert( events != NULL ); + __glutHandleWindows(); + while (GL_TRUE) { DFBEvent evt, prev; g_idle = GL_TRUE; __glutHandleTimers(); - __glutHandleWindows(); prev.clazz = DFEC_NONE; @@ -471,13 +472,19 @@ glutMainLoop( void ) __glutHandleTimers(); } + __glutHandleWindows(); + if (g_idle) { if (idle_func) { idle_func(); } else { + int msec; __glutSetWindow( NULL ); - usleep( 500 ); + if (__glutGetTimeout( &msec )) + events->WaitForEventWithTimeout( events, msec/1000, msec%1000 ); + else + events->WaitForEvent( events ); } } } |