diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-06-12 18:17:35 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-06-12 18:17:35 +0000 |
| commit | 68108ad7d80adc89b947f5dc7991da0273e15eb4 (patch) | |
| tree | 8820f7bd3caa114f0690924e42947e174e55e866 | |
| parent | add license (diff) | |
shm: width/height must match
| -rw-r--r-- | shm.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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; |
