From: Good Guy Date: Tue, 27 Nov 2018 05:25:54 +0000 (-0700) Subject: rework restore_windows for layout X-Git-Tag: 2019-08~175 X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=7742a5b086fb7dc60ffc75459b1d25f80fe47990;p=goodguy%2Fcinelerra.git rework restore_windows for layout --- diff --git a/cinelerra-5.1/cinelerra/mwindow.C b/cinelerra-5.1/cinelerra/mwindow.C index 601f5c24..96016f5d 100644 --- a/cinelerra-5.1/cinelerra/mwindow.C +++ b/cinelerra-5.1/cinelerra/mwindow.C @@ -2861,31 +2861,45 @@ void MWindow::restore_windows() if( !session->show_vwindow ) { for( int i=0, n=vwindows.size(); igui->close(0); + if( !vwindow || !vwindow->is_running() ) continue; + vwindow->gui->lock_window("MWindow::restore_windows"); + vwindow->gui->close(1); + vwindow->gui->unlock_window(); } } else show_vwindow(); - if( !session->show_awindow ) - awindow->gui->close(0); - else + if( !session->show_awindow && !awindow->gui->is_hidden() ) { + awindow->gui->lock_window("MWindow::restore_windows"); + awindow->gui->close_event(); + awindow->gui->unlock_window(); + } + else if( session->show_awindow && awindow->gui->is_hidden() ) show_awindow(); - if( !session->show_cwindow ) - cwindow->gui->close(0); - else - show_cwindow(); + if( !session->show_cwindow && !cwindow->gui->is_hidden() ) { + cwindow->gui->lock_window("MWindow::restore_windows"); + cwindow->hide_window(); + cwindow->gui->unlock_window(); + } + else if( session->show_cwindow && cwindow->gui->is_hidden() ) + cwindow->show_window(); - if( !session->show_gwindow ) - gwindow->gui->close(0); - else + if( !session->show_gwindow && !gwindow->gui->is_hidden() ) { + gwindow->gui->lock_window("MWindow::restore_windows"); + gwindow->gui->close_event(); + gwindow->gui->unlock_window(); + } + else if( session->show_gwindow && gwindow->gui->is_hidden() ) show_gwindow(); - if( !session->show_lwindow ) - lwindow->gui->close(0); - else + if( !session->show_lwindow && !lwindow->gui->is_hidden() ) { + lwindow->gui->lock_window("MWindow::restore_windows"); + lwindow->gui->close_event(); + lwindow->gui->unlock_window(); + } + else if( session->show_lwindow && lwindow->gui->is_hidden() ) show_lwindow(); }