1
0
Fork 0
forked from wry/wry

Merge pull request #765 from mahkoh/jorth/data-device-manager-destructor

wl_data_device_manager: implement version 4
This commit is contained in:
mahkoh 2026-02-28 14:52:38 +01:00 committed by GitHub
commit 9b870fb8e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 15 additions and 3 deletions

View file

@ -167,7 +167,7 @@ Jay supports the following wayland protocols:
| jay_tray_v1 | 1 | |
| org_kde_kwin_server_decoration_manager | 1 | |
| wl_compositor | 6 | |
| wl_data_device_manager | 3 | |
| wl_data_device_manager | 4 | |
| wl_drm | 2 | |
| wl_fixes | 1 | |
| wl_output | 4 | |

View file

@ -81,6 +81,11 @@ impl WlDataDeviceManagerRequestHandler for WlDataDeviceManager {
self.client.add_client_obj(&dev)?;
Ok(())
}
fn release(&self, _req: Release, _slf: &Rc<Self>) -> Result<(), Self::Error> {
self.client.remove_obj(self)?;
Ok(())
}
}
global_base!(
@ -95,7 +100,7 @@ impl Global for WlDataDeviceManagerGlobal {
}
fn version(&self) -> u32 {
3
4
}
}

View file

@ -6,3 +6,6 @@ request get_data_device {
id: id(wl_data_device) (new),
seat: id(wl_seat),
}
request release (destructor, since = 4) {
}

View file

@ -2,7 +2,7 @@ request bind {
name: u32,
interface: str,
version: u32,
id: id(object),
id: id(object) (new),
}
event global {

View file

@ -90,6 +90,10 @@ fn handle_file_(path: &str) -> Result<(), BuilderError> {
args.next();
continue;
}
if arg.ty == ArgType::NewId && arg.interface.is_none() {
writeln!(file, " interface: str,")?;
writeln!(file, " version: u32,")?;
}
write!(file, " {}: ", arg.name)?;
'ty: {
let ty = match arg.ty {