1
0
Fork 0
forked from wry/wry

autocommit 2022-04-28 19:49:51 CEST

This commit is contained in:
Julian Orth 2022-04-28 19:49:51 +02:00
parent bd63f3f5f1
commit 1242a6c1e1
31 changed files with 707 additions and 64 deletions

View file

@ -61,7 +61,10 @@ impl ZwpLinuxBufferParamsV1 {
self.parent.client.event(Failed { self_id: self.id })
}
fn destroy(self: &Rc<Self>, parser: MsgParser<'_, '_>) -> Result<(), ZwpLinuxBufferParamsV1Error> {
fn destroy(
self: &Rc<Self>,
parser: MsgParser<'_, '_>,
) -> Result<(), ZwpLinuxBufferParamsV1Error> {
let _req: Destroy = self.parent.client.parse(&**self, parser)?;
self.parent.client.remove_obj(&**self)?;
Ok(())
@ -71,7 +74,9 @@ impl ZwpLinuxBufferParamsV1 {
let req: Add = self.parent.client.parse(&**self, parser)?;
let modifier = ((req.modifier_hi as u64) << 32) | req.modifier_lo as u64;
match self.modifier.get() {
Some(m) if m != modifier => return Err(ZwpLinuxBufferParamsV1Error::MixedModifiers(modifier, m)),
Some(m) if m != modifier => {
return Err(ZwpLinuxBufferParamsV1Error::MixedModifiers(modifier, m))
}
_ => self.modifier.set(Some(modifier)),
}
let plane = req.plane_idx;