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

@ -18,7 +18,7 @@ use {
xdg_toplevel_drag_v1::XdgToplevelDragV1,
},
leaks::Tracker,
object::Object,
object::{Object, Version},
utils::{
bitflags::BitflagsExt,
buffd::{MsgParser, MsgParserError},
@ -40,7 +40,7 @@ const INVALID_SOURCE: u32 = 1;
pub struct WlDataSource {
pub id: WlDataSourceId,
pub data: SourceData,
pub version: u32,
pub version: Version,
pub tracker: Tracker<Self>,
pub toplevel_drag: CloneCell<Option<Rc<XdgToplevelDragV1>>>,
}
@ -94,7 +94,7 @@ impl DynDataSource for WlDataSource {
}
impl WlDataSource {
pub fn new(id: WlDataSourceId, client: &Rc<Client>, version: u32) -> Self {
pub fn new(id: WlDataSourceId, client: &Rc<Client>, version: Version) -> Self {
Self {
id,
tracker: Default::default(),