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.
Since the protocol is more or less exactly the same as wlr-data-control, I added some wrappers and macros to re-use the same existing code for both protocols.
Some things I didn't do because it seemed like too much effort:
data_control
instead of macros to reduce the curse and to avoid duplicate codegen.The only (if I didn't miss something) API breaking change is that I got rid of
name
in theMissingProtocol
error and instead spelled it out in the message. This is not strictly required, but might as well do it, I'll bump minor for this anyway.@bugaevc wanna take a look? I tested this on niri v25.02, verifying via WAYLAND_DEBUG that it used ext-data-control.
The diff is best viewed ignoring whitespace.