~kennylevinsen/wlavu

559b181204ff8aa178a03a6ad6e63fa6cd2708bf — Kenny Levinsen 3 years ago 4804b41
Reflow wl_surface_damage_buffer
1 files changed, 6 insertions(+), 2 deletions(-)

M main.c
M main.c => main.c +6 -2
@@ 425,11 425,15 @@ static int draw(struct context *ctx) {

	if (buf->height > buf->width) {
		int extend = draw_vert(ctx, buf);
		wl_surface_damage_buffer(ctx->surface, 0, ctx->height - max(ctx->last_extend, extend), buf->width, max(ctx->last_extend, extend));
		wl_surface_damage_buffer(ctx->surface,
				0, ctx->height - max(ctx->last_extend, extend),
				buf->width, max(ctx->last_extend, extend));
		ctx->last_extend = extend;
	} else {
		int extend = draw_horiz(ctx, buf);
		wl_surface_damage_buffer(ctx->surface, 0, 0, max(ctx->last_extend, extend), buf->height);
		wl_surface_damage_buffer(ctx->surface,
				0, 0,
				max(ctx->last_extend, extend), buf->height);
		ctx->last_extend = extend;
	}