From 68108ad7d80adc89b947f5dc7991da0273e15eb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 12 Jun 2019 20:17:35 +0200 Subject: [PATCH] shm: width/height must match --- shm.c | 3 +++ 1 file changed, 3 insertions(+) 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;