1
0
Fork 0
forked from wry/wry

wayland: make object versions type safe

This commit is contained in:
Julian Orth 2024-04-08 14:47:50 +02:00
parent 0d7b45d149
commit e3a1a0b30f
50 changed files with 198 additions and 173 deletions

View file

@ -7,7 +7,7 @@ use {
xdg_positioner::XdgPositioner,
},
leaks::Tracker,
object::Object,
object::{Object, Version},
utils::{
buffd::{MsgParser, MsgParserError},
copyhashmap::CopyHashMap,
@ -37,7 +37,7 @@ pub struct XdgWmBaseGlobal {
pub struct XdgWmBase {
id: XdgWmBaseId,
client: Rc<Client>,
pub version: u32,
pub version: Version,
pub(super) surfaces: CopyHashMap<XdgSurfaceId, Rc<XdgSurface>>,
pub tracker: Tracker<Self>,
}
@ -51,7 +51,7 @@ impl XdgWmBaseGlobal {
self: Rc<Self>,
id: XdgWmBaseId,
client: &Rc<Client>,
version: u32,
version: Version,
) -> Result<(), XdgWmBaseError> {
let obj = Rc::new(XdgWmBase {
id,