1
0
Fork 0
forked from wry/wry

wayland: implement wl_shm v2

This commit is contained in:
Julian Orth 2024-02-06 10:56:15 +01:00
parent 8bac01ca70
commit 3d51969726
2 changed files with 12 additions and 2 deletions

View file

@ -71,6 +71,12 @@ impl WlShm {
self.client.add_client_obj(&pool)?;
Ok(())
}
fn release(&self, parser: MsgParser<'_, '_>) -> Result<(), WlShmError> {
let _req: Release = self.client.parse(self, parser)?;
self.client.remove_obj(self)?;
Ok(())
}
}
global_base!(WlShmGlobal, WlShm, WlShmError);
@ -81,7 +87,7 @@ impl Global for WlShmGlobal {
}
fn version(&self) -> u32 {
1
2
}
}
@ -91,11 +97,12 @@ object_base! {
WlShm;
CREATE_POOL => create_pool,
RELEASE => release,
}
impl Object for WlShm {
fn num_requests(&self) -> u32 {
CREATE_POOL + 1
RELEASE + 1
}
}

View file

@ -6,6 +6,9 @@ msg create_pool = 0 {
size: i32,
}
msg release = 1 {
}
# events
msg format = 0 {