X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fcanvas.C;h=0997e064dcafd393acce96fadf419b65ad3a2cd9;hp=2b3953002d58cc03f8dc56321dd223baea9ede1e;hb=2e28d225c343f02500594688bf8d0528df40600c;hpb=7773615d89c9da219d3ade11c265601bfbc07dc0 diff --git a/cinelerra-5.1/cinelerra/canvas.C b/cinelerra-5.1/cinelerra/canvas.C index 2b395300..0997e064 100644 --- a/cinelerra-5.1/cinelerra/canvas.C +++ b/cinelerra-5.1/cinelerra/canvas.C @@ -576,6 +576,22 @@ void Canvas::get_scrollbars(EDL *edl, //printf("Canvas::get_scrollbars 5 %d %d\n", get_xscroll(), get_yscroll()); } + +void Canvas::update_geometry(EDL *edl, int x, int y, int w, int h) +{ + int redraw = 0; + if( this->x != x || this->y != y || + this->w != w || this->h != h ) redraw = 1; + if( !redraw ) { + int vx = x, vy = y, vw = w, vh = h; + get_scrollbars(edl, vx, vy, vw, vh); + if( vx != view_x || vy != view_y || + vw != view_w || vh != view_h ) redraw = 1; + } + if( !redraw ) return; + reposition_window(edl, x, y, w, y); +} + void Canvas::reposition_window(EDL *edl, int x, int y, int w, int h) { this->x = view_x = x; this->y = view_y = y; @@ -596,8 +612,6 @@ void Canvas::reposition_window(EDL *edl, int x, int y, int w, int h) canvas_subwindow->flash(0); } } - - draw_refresh(0); }