feat: tile managed windows with layout tree
This commit is contained in:
1 parent
03f6b9b8e1
commit
58d91363d6
7 files changed
+116
-3
No files matched your search
@@ -34,8 +34,24 @@ impl XdgShellHandler for Ferese {
|
||||
}
|
||||
|
||||
fn new_toplevel(&mut self, surface: ToplevelSurface) {
|
||||
self.space
|
||||
.map_element(Window::new_wayland_window(surface), (0, 0), true);
|
||||
self.add_tiled_window(Window::new_wayland_window(surface));
|
||||
}
|
||||
|
||||
fn toplevel_destroyed(&mut self, surface: ToplevelSurface) {
|
||||
let Some(window) = self
|
||||
.space
|
||||
.elements()
|
||||
.find(|window| {
|
||||
window
|
||||
.toplevel()
|
||||
.is_some_and(|toplevel| toplevel.wl_surface() == surface.wl_surface())
|
||||
})
|
||||
.cloned()
|
||||
else {
|
||||
return;
|
||||
};
|
||||
|
||||
self.remove_tiled_window(&window);
|
||||
}
|
||||
|
||||
fn new_popup(&mut self, surface: PopupSurface, _positioner: PositionerState) {
|
||||
|
||||
Reference in new issue
Block a user