Close layer surfaces upon output removal
Browse files at this commit9e667efc4c73f3e3f2c12b500ed7f41cf11ce5e6Parent: 8a7e4bc1 changed file +4 -0
- src/niri.rs +4 -0
src/niri.rsmodified+4 -0
| @@ -1114,6 +1114,10 @@ impl Niri { | |||
| 1114 | } | 1114 | } |
| 1115 | 1115 | ||
| 1116 | pub fn remove_output(&mut self, output: &Output) { | 1116 | pub fn remove_output(&mut self, output: &Output) { |
| 1117 | + for layer in layer_map_for_output(output).layers() { | ||
| 1118 | + layer.layer_surface().send_close(); | ||
| 1119 | + } | ||
| 1120 | + | ||
| 1117 | self.layout.remove_output(output); | 1121 | self.layout.remove_output(output); |
| 1118 | self.global_space.unmap_output(output); | 1122 | self.global_space.unmap_output(output); |
| 1119 | self.reposition_outputs(None); | 1123 | self.reposition_outputs(None); |