port 7.2 mods: align_edits foreground plugin refresh_frame tweak, rework soundlevel...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / vwindowgui.C
index 8ecdb0d624d39fa9e58da292ee50a838c600d4ac..1fb4ca21d64bafb76ed674f1d15659274ee7dbdc 100644 (file)
@@ -363,16 +363,12 @@ int VWindowGUI::keypress_event()
        case 'Z':
                mwindow->redo_entry(this);
                break;
-       case 'f':
-               unlock_window();
-               canvas->use_fullscreen(canvas->get_fullscreen() ? 0 : 1);
-               lock_window("VWindowGUI::keypress_event 1");
-               break;
+       case 'f': {
+               int on = canvas->get_fullscreen() ? 0 : 1;
+               canvas->set_fullscreen(on, 1);
+               break; }
        case ESC:
-               unlock_window();
-               if( canvas->get_fullscreen() )
-                       canvas->use_fullscreen(0);
-               lock_window("VWindowGUI::keypress_event 2");
+               canvas->set_fullscreen(0, 1);
                break;
        case KEY_F1:
        case KEY_F2:
@@ -828,14 +824,14 @@ void VWindowCanvas::close_source()
 
 void VWindowCanvas::draw_refresh(int flush)
 {
-       EDL *edl = gui->vwindow->get_edl();
-
        if( !get_canvas()->get_video_on() ) {
                int cw = get_canvas()->get_w(), ch = get_canvas()->get_h();
                get_canvas()->clear_box(0, 0, cw, ch);
-               int ow = edl ? get_output_w(edl) : 0;
-               int oh = edl ? get_output_h(edl) : 0;
-               if( ow > 0 && oh > 0 && refresh_frame ) {
+       }
+       EDL *edl = gui->vwindow->get_edl();
+       if( refresh_frame && edl ) {
+               int ow = get_output_w(edl), oh = get_output_h(edl);
+               if( ow > 0 && oh > 0 ) {
                        float in_x1, in_y1, in_x2, in_y2;
                        float out_x1, out_y1, out_x2, out_y2;
                        get_transfers(edl,
@@ -855,6 +851,8 @@ void VWindowCanvas::draw_refresh(int flush)
                                (int)(in_x2 - in_x1), (int)(in_y2 - in_y1),
                                0);
                }
+       }
+       if( !get_canvas()->get_video_on() ) {
                draw_overlays();
                get_canvas()->flash(flush);
        }
@@ -878,14 +876,3 @@ void VWindowCanvas::draw_overlays()
        }
 }
 
-int VWindowCanvas::use_fullscreen(int on)
-{
-       if( Canvas::use_fullscreen(on) ) {
-               gui->lock_window("VWindowCanvas::use_fullscreen");
-               zoom_auto();
-               draw_refresh(1);
-               gui->unlock_window();
-       }
-       return 1;
-}
-