aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-06-12 18:17:35 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-06-12 18:17:35 +0000
commit68108ad7d80adc89b947f5dc7991da0273e15eb4 (patch)
tree8820f7bd3caa114f0690924e42947e174e55e866
parentadd license (diff)
shm: width/height must match
-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;