Skip to content

fix: support calls to constructors with new_id not as first param#9

Open
FireyFly wants to merge 1 commit into
Nooo37:masterfrom
FireyFly:fix/support-nonfirst-new_id
Open

fix: support calls to constructors with new_id not as first param#9
FireyFly wants to merge 1 commit into
Nooo37:masterfrom
FireyFly:fix/support-nonfirst-new_id

Conversation

@FireyFly
Copy link
Copy Markdown
Contributor

@FireyFly FireyFly commented May 7, 2026

Existing code assumed calls to wayland methods returning proxies (constructors) had the returned new_id as its first parameter. This works for most Wayland protocols, but breaks for e.g. river_xkb_bindings_v1::get_xkb_binding.

Instead, update the marshaling of constructors to specifically look for the new_id parameter index and insert a nil parameter in its place. In case of a new_id without a defined interface, we pluck out interface name and version before the nil (the VERSIONED_CONSTRUCTOR case in the diff)

It might make more sense to use a reified table rather than the varargs/rest parameters for doing the inserts/etc... but this is what I ended up with for now, and it works fine.

Existing code assumed calls to wayland methods returning proxies
(constructors) had the returned `new_id` as its first parameter.

Might be better to use a table rather than do list operations on
the varargs/rest parameers.
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