Merge pull request #765 from mahkoh/jorth/data-device-manager-destructor
wl_data_device_manager: implement version 4
This commit is contained in:
commit
9b870fb8e2
5 changed files with 15 additions and 3 deletions
|
|
@ -167,7 +167,7 @@ Jay supports the following wayland protocols:
|
||||||
| jay_tray_v1 | 1 | |
|
| jay_tray_v1 | 1 | |
|
||||||
| org_kde_kwin_server_decoration_manager | 1 | |
|
| org_kde_kwin_server_decoration_manager | 1 | |
|
||||||
| wl_compositor | 6 | |
|
| wl_compositor | 6 | |
|
||||||
| wl_data_device_manager | 3 | |
|
| wl_data_device_manager | 4 | |
|
||||||
| wl_drm | 2 | |
|
| wl_drm | 2 | |
|
||||||
| wl_fixes | 1 | |
|
| wl_fixes | 1 | |
|
||||||
| wl_output | 4 | |
|
| wl_output | 4 | |
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,11 @@ impl WlDataDeviceManagerRequestHandler for WlDataDeviceManager {
|
||||||
self.client.add_client_obj(&dev)?;
|
self.client.add_client_obj(&dev)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn release(&self, _req: Release, _slf: &Rc<Self>) -> Result<(), Self::Error> {
|
||||||
|
self.client.remove_obj(self)?;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
global_base!(
|
global_base!(
|
||||||
|
|
@ -95,7 +100,7 @@ impl Global for WlDataDeviceManagerGlobal {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn version(&self) -> u32 {
|
fn version(&self) -> u32 {
|
||||||
3
|
4
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,3 +6,6 @@ request get_data_device {
|
||||||
id: id(wl_data_device) (new),
|
id: id(wl_data_device) (new),
|
||||||
seat: id(wl_seat),
|
seat: id(wl_seat),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
request release (destructor, since = 4) {
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ request bind {
|
||||||
name: u32,
|
name: u32,
|
||||||
interface: str,
|
interface: str,
|
||||||
version: u32,
|
version: u32,
|
||||||
id: id(object),
|
id: id(object) (new),
|
||||||
}
|
}
|
||||||
|
|
||||||
event global {
|
event global {
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,10 @@ fn handle_file_(path: &str) -> Result<(), BuilderError> {
|
||||||
args.next();
|
args.next();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if arg.ty == ArgType::NewId && arg.interface.is_none() {
|
||||||
|
writeln!(file, " interface: str,")?;
|
||||||
|
writeln!(file, " version: u32,")?;
|
||||||
|
}
|
||||||
write!(file, " {}: ", arg.name)?;
|
write!(file, " {}: ", arg.name)?;
|
||||||
'ty: {
|
'ty: {
|
||||||
let ty = match arg.ty {
|
let ty = match arg.ty {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue