aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2023-11-01 17:26:30 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2023-11-01 17:26:30 +0400
commit5a86b437448e5f8cea4ae2702dc242a8e15d77b8 (patch)
treef911fdb739232ab31fae13b643e0aef58029c75c
parente0a76b62150f1dc176ec86878198f932543d084e (diff)
downloadniri-5a86b437448e5f8cea4ae2702dc242a8e15d77b8.tar.gz
niri-5a86b437448e5f8cea4ae2702dc242a8e15d77b8.tar.bz2
niri-5a86b437448e5f8cea4ae2702dc242a8e15d77b8.zip
Fix losing track of window on move to output if there are none
-rw-r--r--src/layout.rs4
1 files changed, 4 insertions, 0 deletions
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<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 {