fix(wm): add bounds checks on max window creation

This commit ensures that the bounds of the resize_dimensions member on a
workspace are checked before attempting removal when maximizing a window
using the toggle-maximize command or cycle-focus commands.

fix #331
This commit is contained in:
LGUG2Z
2023-01-04 07:19:07 -08:00
parent 499a960f4c
commit fd351b6a01
2 changed files with 54 additions and 11 deletions
+3 -1
View File
@@ -856,7 +856,9 @@ impl Workspace {
if container.windows().is_empty() {
self.containers_mut().remove(focused_idx);
self.resize_dimensions_mut().remove(focused_idx);
if self.resize_dimensions().get(focused_idx).is_some() {
self.resize_dimensions_mut().remove(focused_idx);
}
} else {
container.load_focused_window();
}