X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fandroid%2Ffg_main_android.c;h=1fa41d62c4d64f6004cebe68dc1b0c9c408358ea;hb=a00c7ee3552b527ac6b375d6a6ca42f90770ddc3;hp=4c862f5615ca206babd05feb15230616412a8343;hpb=edfc70126a7ad6f62ec86ad7f11b734a10133911;p=freeglut diff --git a/src/android/fg_main_android.c b/src/android/fg_main_android.c index 4c862f5..1fa41d6 100644 --- a/src/android/fg_main_android.c +++ b/src/android/fg_main_android.c @@ -495,6 +495,8 @@ void fgPlatformProcessWork(SFG_Window *window) /* Now clear it so that any callback generated by the actions below can set work again */ window->State.WorkMask = 0; + if (workMask&~GLUT_DISPLAY_WORK) /* Display work is the common case, skip all the below at once */ + { /* This is before the first display callback: call a few callbacks to inform user of window size, position, etc * we know this is before the first display callback of a window as for all windows GLUT_INIT_WORK is set when * they are opened, and work is done before displaying in the mainloop. @@ -562,5 +564,15 @@ void fgPlatformProcessWork(SFG_Window *window) break; } } + } + + if (workMask & GLUT_DISPLAY_WORK) + { + if( window->State.Visible ) + fghRedrawWindow ( window ); + + /* Strip out display work that might have ended up on work list now as some of the above genereates callbacks */ + window->State.WorkMask &= ~GLUT_DISPLAY_WORK; + } }