Skip to content

wlr: expose xdg configure serials - #9

Merged
DeedleFake merged 1 commit into
masterfrom
xdg-configure-serials
Sep 30, 2026
Merged

DeedleFake merged 1 commit into
masterfrom
xdg-configure-serials

Conversation

@DeedleFake

@DeedleFake DeedleFake commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

XDGToplevel.SetSize now returns the configure serial, like wlr_xdg_toplevel_set_size already does. The old signature dropped it. No caller in this module used the result, so nothing else changes.

This also adds XDGSurfaceState.ConfigureSerial, a plain accessor for the configure_serial field of wlr_xdg_surface_state. XDGSurface.Current().ConfigureSerial() is the serial of the last configure the client acked and then committed. That second binding is not part of the original ask, but the serial from SetSize is only useful next to it. There is no ack_configure event in the bindings, so without it a compositor can't tell when a client has caught up.

kawa needs both to stop flooding xdg clients with configures during an interactive resize. It sends one size, waits until the client acks and commits that serial, and only then sends the newest size it wanted in the meantime. Today it sends one configure per pointer motion. A client that falls behind fills its socket buffer and gets disconnected with Data too big for buffer.

Verified with go build ./... and go vet . against wlroots 0.20.2, and by running kawa pinned to this branch (DeedleFake/kawa#16) in a nested session. A 200-motion resize drag of a weston-terminal went from 107 configures to 6, and the last one still carried the final dragged size.

@DeedleFake
DeedleFake merged commit 3b4a1ae into master Sep 30, 2026
2 checks passed
@DeedleFake
DeedleFake deleted the xdg-configure-serials branch September 30, 2026 20:09
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.

1 participant