From 404377a1edcb2059efd35d91ca8ac3ed14c38994 Mon Sep 17 00:00:00 2001 From: Ottatop Date: Fri, 3 May 2024 22:43:59 -0500 Subject: [PATCH] Fix out-of-bounds panic --- src/render.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/render.rs b/src/render.rs index 77f89b5..3f83c76 100644 --- a/src/render.rs +++ b/src/render.rs @@ -151,7 +151,7 @@ where .rev() // rev because I treat the focus stack backwards vs how the renderer orders it .filter(|win| win.is_on_active_tag()) .enumerate() - .flat_map(|(i, win)| { + .map(|(i, win)| { if win.with_state(|state| state.fullscreen_or_maximized.is_fullscreen()) { last_fullscreen_split_at = i + 1; } @@ -171,7 +171,10 @@ where let rest = fullscreen_and_up.split_off(last_fullscreen_split_at); - (fullscreen_and_up, rest) + ( + fullscreen_and_up.into_iter().flatten().collect(), + rest.into_iter().flatten().collect(), + ) } pub fn pointer_render_elements(