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

This commit is contained in:
Ivan Molodetskikh
2023-11-01 17:26:30 +04:00
parent e0a76b6215
commit 5a86b43744
+4
View File
@@ -1211,6 +1211,10 @@ impl<W: LayoutElement> Layout<W> {
}
pub fn move_window_to_output(&mut self, window: W, output: &Output) {
if !matches!(&self.monitor_set, MonitorSet::Normal { .. }) {
return;
}
self.remove_window(&window);
if let MonitorSet::Normal { monitors, .. } = &mut self.monitor_set {