2020#include " glui.h"
2121#include " stdinc.h"
2222
23+ static int allow_glui_post_redisplay = 1 ;
24+
25+ /* *********************************** GetGluiPostReDisplay ************/
26+
27+ int GetGluiPostReDisplay (void ){
28+ return allow_glui_post_redisplay;
29+ }
30+
2331/* *********************************** GluiPostRedisplayOn ************/
2432
2533void GluiPostRedisplayOn (void ){
@@ -986,7 +994,7 @@ void GLUI_Main::post_update_main_gfx( void )
986994 if ( main_gfx_window_id > 0 ) {
987995 old_window = glutGetWindow ();
988996 glutSetWindow ( main_gfx_window_id );
989- if (allow_glui_post_redisplay ==1 )glutPostRedisplay ();
997+ if (GetGluiPostReDisplay () ==1 )glutPostRedisplay ();
990998 if ( old_window > 0 )
991999 glutSetWindow ( old_window );
9921000 }
@@ -1427,7 +1435,7 @@ void GLUI::close( void )
14271435
14281436 old_glut_window = glutGetWindow ();
14291437 glutSetWindow ( get_glut_window_id () );
1430- if (allow_glui_post_redisplay== 1 )glutPostRedisplay ();
1438+ if (GetGluiPostReDisplay () == 1 )glutPostRedisplay ();
14311439
14321440 glutSetWindow ( old_glut_window );
14331441}
@@ -1864,7 +1872,7 @@ void GLUI_Main::refresh( void )
18641872
18651873 if ( glut_window_id > 0 )
18661874 glutSetWindow ( glut_window_id );
1867- if (allow_glui_post_redisplay ==1 )glutPostRedisplay ();
1875+ if (GetGluiPostReDisplay () ==1 )glutPostRedisplay ();
18681876
18691877 /* printf( "top_level: %d\n", top_level_glut_window_id );*/
18701878 glutSetWindow ( top_level_glut_window_id );
@@ -1883,7 +1891,7 @@ void GLUI_Main::refresh( void )
18831891
18841892 glutReshapeWindow ( new_w, new_h );
18851893
1886- if (allow_glui_post_redisplay ==1 )glutPostRedisplay ();
1894+ if (GetGluiPostReDisplay () ==1 )glutPostRedisplay ();
18871895 }
18881896
18891897 glutSetWindow ( orig);
0 commit comments