build tweaks for fc30, glFinish fix
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / cwindowgui.C
index b62bd09bba03219887937855380c35394a8ed27d..7b3e919829b2edc1edc41c0d697ccd7745ccbc3c 100644 (file)
@@ -1128,20 +1128,11 @@ void CWindowCanvas::draw_refresh(int flush)
        if( get_canvas() && !get_canvas()->get_video_on() ) {
                clear(0);
                if( mwindow->uses_opengl() ) {
-                       get_canvas()->unlock_window();
-                       get_canvas()->flush();
-                       get_canvas()->sync_display();
 // 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();
+                       get_canvas()->unlock_window();
+                       mwindow->playback_3d->finish_output(this);
                        get_canvas()->lock_window("CWindowCanvas::draw_refresh");
                }
                if( refresh_frame && refresh_frame->get_w()>0 && refresh_frame->get_h()>0 ) {