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