+// this code is to idle rendering before drawing overlays on refresh frame
+// if this is not done, occationally opengl finishs late, and overwrites
+// the x11 refresh frame and the overlay is not visible. Rarely happens.
+// bug in gl libs may segv if glfinish is called, workaround is no finish
+ static int cin_finish = -1;
+ if( cin_finish < 0 ) {
+ const char *cp = getenv("CIN_FINISH");
+ cin_finish = !cp ? 1 : atoi(cp);
+ }
+ if( cin_finish )
+ mwindow->playback_3d->finish_output();