X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fmwindow.C;h=c57c2ecf492e3943f0a7da3a0e5fc299f9a27685;hb=c7feb9d662d73e26e59b60552011116ec1121430;hp=f8d4fc4e86f4b17223173db31238de226c942586;hpb=a718f58e6d8061f83bd0c0b10848ac415cd21fcd;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/mwindow.C b/cinelerra-5.1/cinelerra/mwindow.C index f8d4fc4e..c57c2ecf 100644 --- a/cinelerra-5.1/cinelerra/mwindow.C +++ b/cinelerra-5.1/cinelerra/mwindow.C @@ -1469,6 +1469,26 @@ int MWindow::select_zwindow(ZWindow *zwindow) void MWindow::tile_mixers() { + int x1 = session->tile_mixers_x; + int y1 = session->tile_mixers_y; + int x2 = x1 + session->tile_mixers_w; + int y2 = y1 + session->tile_mixers_h; + tile_mixers(x1, y1, x2, y2); +} + +void MWindow::tile_mixers(int x1, int y1, int x2, int y2) +{ + if( x1 == x2 || y1 == y2 ) { +// use top left quadrent + int sw = gui->get_screen_w(1, -1); + int sh = gui->get_screen_w(1, -1); + x1 = 1; y1 = 1; + x2 = sw/2; y2 = sh/2; + } + else { + if( x1 > x2 ) { int t = x1; x1 = x2; x2 = t; } + if( y1 > y2 ) { int t = y1; y1 = y2; y2 = t; } + } int nz = 0; for( int i=0; iget_x(), x2 = cwindow->gui->get_x(); - int y1 = 1, y2 = gui->get_y(); int rw = gui->get_root_w(0), rh = gui->get_root_h(0); if( x1 < 0 ) x1 = 0; if( y1 < 0 ) y1 = 0; @@ -3054,6 +3072,7 @@ void MWindow::restore_windows() else if( session->show_lwindow && lwindow->gui->is_hidden() ) show_lwindow(); + tile_mixers(); gui->lock_window("MWindow::restore_windows"); gui->focus(); }