bar/wayland: use cairo_format_stride_for_width() to calculate stride

This commit is contained in:
Daniel Eklöf 2019-03-03 12:56:13 +01:00
parent cf680573c2
commit 6030ef5298

View file

@ -466,7 +466,8 @@ get_buffer(struct wayland_backend *backend)
}
/* Total size */
uint32_t stride = backend->width * 4;
const uint32_t stride = cairo_format_stride_for_width(
CAIRO_FORMAT_ARGB32, backend->width);
size = stride * backend->height;
ftruncate(pool_fd, size);