mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
Implement floating child stacking above parents
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user