mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-15 08:21:03 -04:00
shm: width/height must match
This commit is contained in:
parent
eafd5b26d3
commit
68108ad7d8
1 changed files with 3 additions and 0 deletions
3
shm.c
3
shm.c
|
|
@ -30,6 +30,9 @@ struct buffer *
|
||||||
shm_get_buffer(struct wl_shm *shm, int width, int height)
|
shm_get_buffer(struct wl_shm *shm, int width, int height)
|
||||||
{
|
{
|
||||||
tll_foreach(buffers, it) {
|
tll_foreach(buffers, it) {
|
||||||
|
if (it->item.width != width || it->item.height != height)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (!it->item.busy) {
|
if (!it->item.busy) {
|
||||||
it->item.busy = true;
|
it->item.busy = true;
|
||||||
return &it->item;
|
return &it->item;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue