aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/shm.c b/shm.c
index d691be10..dd85ef3f 100644
--- a/shm.c
+++ b/shm.c
@@ -30,6 +30,9 @@ struct buffer *
shm_get_buffer(struct wl_shm *shm, int width, int height)
{
tll_foreach(buffers, it) {
+ if (it->item.width != width || it->item.height != height)
+ continue;
+
if (!it->item.busy) {
it->item.busy = true;
return &it->item;