Skip to content

wlr: fix listener lifetimes and texture rendering for wlroots 0.20 - #6

Merged
DeedleFake merged 6 commits into
masterfrom
xwayland-associate
Sep 29, 2026
Merged

DeedleFake merged 6 commits into
masterfrom
xwayland-associate

Conversation

@DeedleFake

@DeedleFake DeedleFake commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner

These are the binding changes kawa needs to stop crashing on wlroots 0.20.

  • XwaylandSurface.OnAssociate and OnDissociate. Since wlroots 0.17, an Xwayland surface has no wlr_surface until associate fires, and it loses it again on dissociate. Without these there was no way to know when Surface() was safe to use, so adding a map listener at new_surface time dereferenced NULL.
  • XDGToplevel.OnDestroy. wlroots destroys the toplevel before emitting the XDGSurface's destroy event, and asserts that nothing is still listening to the toplevel's events at that point. Listeners on a toplevel have to be removed from its own destroy event.
  • Surface.OnCommit, XDGSurface.Initialized and XDGSurface.InitialCommit. Anything that sends a configure event, such as setting the toplevel size or the decoration mode, asserts if the client hasn't made its initial commit yet. These let callers wait for it.
  • Keyboard.Valid, to match the other types. Seat.GetKeyboard returns an invalid Keyboard when the seat has none, for example after the last keyboard is removed.
  • RenderPass.AddTexture no longer puts a Go pointer to the alpha value inside the options struct it passes to C. The cgo pointer check panicked on every call.

@DeedleFake DeedleFake changed the title wlr: add xwayland associate/dissociate and xdg toplevel destroy events wlr: fix listener lifetimes and texture rendering for wlroots 0.20 Sep 29, 2026
Comment thread renderpass.go Resolved
@DeedleFake
DeedleFake merged commit 821e773 into master Sep 29, 2026
2 checks passed
@DeedleFake
DeedleFake deleted the xwayland-associate branch September 29, 2026 16:44
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