Repository navigation
wlr: expose popup unconstraining, fd event sources, the xwayland seat and seat selections - #10
Merged
Merged
Conversation
This was referenced Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plain bindings that kawa needs for three fixes in DeedleFake/kawa#16. Each one is its own commit and wraps a single wlroots or libwayland call or event, with nothing added on top.
XDGPopup.UnconstrainFromBoxwrapswlr_xdg_popup_unconstrain_from_box. The box is in the coordinates of the popup's root toplevel surface, as wlroots expects. kawa calls it on a popup's initial commit so menus near a screen edge flip or slide back onto the screen instead of spilling off it.EventLoop.AddFdandEventSource.Removewrapwl_event_loop_add_fdandwl_event_source_remove, plus theWL_EVENT_*mask constants. kawa uses them to get a pid from the goroutine that waits on a program started from New back onto the event loop thread through a pipe. It then removes that program's New box when the program exits without ever opening a window.Xwayland.SetSeatwrapswlr_xwayland_set_seat. Without a seat, wlroots logsnot handling selection events: no seat assigned to xwaylandand X clients get no clipboard. wlroots keeps the seat until Xwayland is ready, so kawa calls it right after creating Xwayland.Seat.OnRequestSetSelection,Seat.SetSelection,Seat.OnRequestSetPrimarySelectionandSeat.SetPrimarySelection, plusDataSourceandPrimarySelectionSourcehandles, wrap the seat'srequest_set_selectionandrequest_set_primary_selectionevents andwlr_seat_set_selectionandwlr_seat_set_primary_selection. Clients, Xwayland included, can only ask for a selection, and nothing changes until the compositor sets it. kawa never handled those requests, so no client could set the clipboard at all.Verified with
go build ./...andgo vet ./...against wlroots 0.20.2, and by running kawa built against this branch in a nested session: