MCPcopy Create free account
hub / github.com/StrataWM/strata / add_window

Method add_window

src/workspaces.rs:106–111  ·  view source on GitHub ↗
(&mut self, window: Rc<RefCell<StrataWindow>>)

Source from the content-addressed store, hash-verified

104 }
105
106 pub fn add_window(&mut self, window: Rc<RefCell<StrataWindow>>) {
107 self.windows.retain(|w| w.borrow().smithay_window != window.borrow().smithay_window);
108 self.windows.push(window.clone());
109 self.layout_tree.insert(window, self.layout_tree.next_split(), 0.5);
110 refresh_geometry(self);
111 }
112
113 pub fn remove_window(&mut self, window: &Window) -> Option<Rc<RefCell<StrataWindow>>> {
114 let mut removed = None;

Callers 2

new_toplevelMethod · 0.80

Calls 3

refresh_geometryFunction · 0.85
insertMethod · 0.80
next_splitMethod · 0.80

Tested by

no test coverage detected