Support ext-data-control-v1 alongside wlr data control
Please read CONTRIBUTING.md before making a pull request.
This change adds ext-data-control-v1 support alongside the existing wlr protocol, allowing the client to select whichever protocol the compositor advertises. It also consolidates shared clipboard logic so both namespaces use the same implementation while keeping protocol-specific types explicit.
- **Protocol assets**
- Add ext-data-control-v1 XML to the build protocol list.
- **Wayland binding selection**
- Prefer ext_data_control_manager_v1 when available, otherwise use zwlr_data_control_manager_v1.
- **Typed data-control state**
- Use explicit wlr/ext struct members instead of void pointers for manager, device, offers, and selections.
- **Clipboard robustness**
- Log and handle failures when setting clipboard or primary selection buffers.
```c
if (wayland->ext_data_control_manager_v1) {
protocol = DATA_CONTROL_PROTOCOL_EXT;
manager = wayland->ext_data_control_manager_v1;
} else if (wayland->zwlr_data_control_manager_v1) {
protocol = DATA_CONTROL_PROTOCOL_WLR;
manager = wayland->zwlr_data_control_manager_v1;
}
```
> [!WARNING]
>
>
<!-- START COPILOT CODING AGENT TIPS -->
---
✨ Let Copilot coding agent [set things up for you](https://github.com/any1/wayvnc/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.
合并状态:未合并 1 条评论