- get_canvas()->unlock_window();
- mwindow->playback_3d->finish_output();
- get_canvas()->lock_window("CWindowCanvas::draw_refresh");
- 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.
+ unlock_canvas();
+ mwindow->playback_3d->finish_output(this);
+ lock_canvas("CWindowCanvas::draw_refresh");