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

@ -78,6 +78,7 @@ use {
clonecell::CloneCell, copyhashmap::CopyHashMap, errorfmt::ErrorFmt, fdcloser::FdCloser,
hash_map_ext::HashMapExt, linkedlist::LinkedList, numcell::NumCell, queue::AsyncQueue,
refcounted::RefCounted, run_toplevel::RunToplevel,
toplevel_identifier::ToplevelIdentifier,
},
video::{
dmabuf::DmaBufIds,
@ -107,7 +108,7 @@ use {
mem,
num::Wrapping,
ops::DerefMut,
rc::Rc,
rc::{Rc, Weak},
sync::Arc,
time::Duration,
},
@ -220,6 +221,7 @@ pub struct State {
pub cpu_worker: Rc<CpuWorker>,
pub ui_drag_enabled: Cell<bool>,
pub ui_drag_threshold_squared: Cell<i32>,
pub toplevels: CopyHashMap<ToplevelIdentifier, Weak<dyn ToplevelNode>>,
}
// impl Drop for State {
@ -875,6 +877,7 @@ impl State {
self.ei_acceptor_future.take();
self.ei_clients.clear();
self.slow_ei_clients.clear();
self.toplevels.clear();
}
pub fn damage_hardware_cursors(&self, render: bool) {