Try again when wl_display.flush() returns EAGAIN

This was causing us to exist when we probably shouldn't have been.
I think the main issue was all the syncNextCommit calls for the bar.

These changes have seeminglly fixed my crash
This commit is contained in:
Ben Buhse 2026-02-27 13:39:08 -06:00
commit f10eecffc4
No known key found for this signature in database
GPG key ID: 7916ACFCD38FD0B4
2 changed files with 10 additions and 5 deletions

View file

@ -319,8 +319,6 @@ pub fn draw(bar: *Bar) !void {
// Attach the buffer to the surface
const surfaces = bar.surfaces orelse return error.NoSurfaces;
const wl_surface = surfaces.wl_surface;
// sync_next_commit ensures frame-perfect application
surfaces.river_shell_surface.syncNextCommit();
wl_surface.setBufferScale(scale);
wl_surface.attach(buffer.wl_buffer, 0, 0);
wl_surface.damageBuffer(0, 0, render_width, render_height);