Skip to content

Conversation

@ids1024
Copy link
Member

@ids1024 ids1024 commented Dec 30, 2025

Adds a test and rs backend implementation for the function added in #815, based on top of #851.

I still want to add bindings (and rs impls) corresponding to wl_display_set_max_buffer_size and wl_client_set_max_buffer_size, but that shouldn't be hard. The main thing is adding support to the rs backend, and verifying consistent behavior.

We'll need add rounding to the rs backend like get_max_size_bits_for_size in libwayland. Maybe it would be best to use NonZeroUsize in the server and Option<NonZeroUsize> in the client, to express that unbounded buffering is an option, but only in the client...

ids1024 and others added 6 commits December 29, 2025 09:31
To match the behavior of `libwayland-client`, we should default to
unbounded buffers; while servers should only use bounded buffers.

I'm not sure why using `roundtrip()` gets `WouldBlock` with
`client_system,server_system`, but not with just `client_system`...
Matches behavior of `libwayland` and the `sys` backend.
This is necessary to increase on higher-end systems (high polling rate hardware/high refresh-rate) to avoid crashing some apps that cannot keep up with the event loop momentarily
fix buffer size set

WIP
@ids1024
Copy link
Member Author

ids1024 commented Dec 30, 2025

Hm, I though it was safe to rely on https://gitlab.freedesktop.org/wayland/wayland/-/commit/d074d52902633d8700ce06b484508db0f8fba02b, since the commit is dated 2021, but it was only merged in 2024.

So like #735, we probably want to use elinorbgr/dlib#22.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants