From 5a86b437448e5f8cea4ae2702dc242a8e15d77b8 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Wed, 1 Nov 2023 17:26:30 +0400 Subject: Fix losing track of window on move to output if there are none --- src/layout.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/layout.rs b/src/layout.rs index 0d288211..97fe60e7 100644 --- a/src/layout.rs +++ b/src/layout.rs @@ -1211,6 +1211,10 @@ impl Layout { } 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 { -- cgit