forge
Explore
Log in

Don't you dare go Hollow

Fix losing track of window on move to output if there are none

Browse files at this commit

5a86b437448e5f8cea4ae2702dc242a8e15d77b8Ivan MolodetskikhParent: e0a76b6
src/layout.rsmodified+4 -0
@@ -1211,6 +1211,10 @@ impl<W: LayoutElement> Layout<W> {
1211 }1211 }
1212 1212
1213 pub fn move_window_to_output(&mut self, window: W, output: &Output) {1213 pub fn move_window_to_output(&mut self, window: W, output: &Output) {
1214+ if !matches!(&self.monitor_set, MonitorSet::Normal { .. }) {
1215+ return;
1216+ }
1217+
1214 self.remove_window(&window);1218 self.remove_window(&window);
1215 1219
1216 if let MonitorSet::Normal { monitors, .. } = &mut self.monitor_set {1220 if let MonitorSet::Normal { monitors, .. } = &mut self.monitor_set {