Implement floating child stacking above parents

This commit is contained in:
Ivan Molodetskikh
2024-12-13 10:28:25 +03:00
parent 4fe718581b
commit aac54d0ea1
6 changed files with 350 additions and 9 deletions
+16
View File
@@ -647,6 +647,22 @@ impl XdgShellHandler for State {
fn title_changed(&mut self, toplevel: ToplevelSurface) {
self.update_window_rules(&toplevel);
}
fn parent_changed(&mut self, toplevel: ToplevelSurface) {
let Some(parent) = toplevel.parent() else {
return;
};
if let Some((mapped, output)) = self.niri.layout.find_window_and_output_mut(&parent) {
let output = output.cloned();
let window = mapped.window.clone();
if self.niri.layout.descendants_added(&window) {
if let Some(output) = output {
self.niri.queue_redraw(&output);
}
}
}
}
}
delegate_xdg_shell!(State);