backend/x11: fix initial value of wlr_x11_buffer.n_busy

We lock the buffer there, so we need to initialize the n_busy
count to 1 as well.

Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3556
This commit is contained in:
Simon Ser 2023-01-03 10:59:57 +01:00
parent 869af1cfbb
commit bc8260f377

View file

@ -255,6 +255,7 @@ static struct wlr_x11_buffer *create_x11_buffer(struct wlr_x11_output *output,
return NULL;
}
buffer->buffer = wlr_buffer_lock(wlr_buffer);
buffer->n_busy = 1;
buffer->pixmap = pixmap;
buffer->x11 = x11;
wl_list_insert(&output->buffers, &buffer->link);