1
0
Fork 0
forked from wry/wry

tree: map toplevel identifiers to toplevels

This commit is contained in:
Julian Orth 2024-10-10 12:43:43 +02:00
parent 43bb787d52
commit e6c3c9c1ed
9 changed files with 57 additions and 27 deletions

View file

@ -38,7 +38,7 @@ use {
cell::{Cell, RefCell},
fmt::{Debug, Formatter},
mem,
rc::Rc,
rc::{Rc, Weak},
},
thiserror::Error,
};
@ -115,7 +115,7 @@ impl Debug for XdgToplevel {
}
impl XdgToplevel {
pub fn new(id: XdgToplevelId, surface: &Rc<XdgSurface>) -> Self {
pub fn new(id: XdgToplevelId, surface: &Rc<XdgSurface>, slf: &Weak<Self>) -> Self {
let mut states = AHashSet::new();
states.insert(STATE_TILED_LEFT);
states.insert(STATE_TILED_RIGHT);
@ -141,6 +141,7 @@ impl XdgToplevel {
state,
String::new(),
Some(surface.surface.client.clone()),
slf,
),
drag: Default::default(),
is_mapped: Cell::new(false),