diff --git a/cmd/wm/column.c b/cmd/wm/column.c index da1d8376..781f4895 100644 --- a/cmd/wm/column.c +++ b/cmd/wm/column.c @@ -110,7 +110,7 @@ relax_column(Area *a) void scale_column(Area *a, float h) { - unsigned int i, yoff = 0; + unsigned int i, yoff; unsigned int min_height = 2 * height_of_bar(); float scale, dy = 0; int hdiff; @@ -121,6 +121,7 @@ scale_column(Area *a, float h) for(i = 0; i < a->frame.size; i++) dy += a->frame.data[i]->rect.height; scale = h / dy; + yoff = 0; for(i = 0; i < a->frame.size; i++) { Frame *f = a->frame.data[i]; f->rect.height *= scale; diff --git a/cmd/wm/view.c b/cmd/wm/view.c index a49ce62b..49d07272 100644 --- a/cmd/wm/view.c +++ b/cmd/wm/view.c @@ -271,7 +271,7 @@ restack_view(View *v) void scale_view(View *v, float w) { - unsigned int i, xoff = 0; + unsigned int i, xoff; float scale, dx = 0; int wdiff = 0; @@ -281,6 +281,7 @@ scale_view(View *v, float w) for(i = 1; i < v->area.size; i++) dx += v->area.data[i]->rect.width; scale = w / dx; + xoff = 0; for(i = 1; i < v->area.size; i++) { Area *a = v->area.data[i]; a->rect.width *= scale;