From 489a225fae57adba01057893d244c64c749bccfe Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Sun, 24 Dec 2023 18:00:46 +0400 Subject: Add and use remove_window_by_idx --- src/layout/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/layout/mod.rs') diff --git a/src/layout/mod.rs b/src/layout/mod.rs index 9e8cbe53..b5cb7178 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -1045,10 +1045,9 @@ impl Layout { return; } let column = &ws.columns[ws.active_column_idx]; - let window = column.windows[column.active_window_idx].clone(); let width = column.width; let is_full_width = column.is_full_width; - ws.remove_window(&window); + let window = ws.remove_window_by_idx(ws.active_column_idx, column.active_window_idx); let workspace_idx = monitors[new_idx].active_workspace_idx; self.add_window_by_idx(new_idx, workspace_idx, window, true, width, is_full_width); -- cgit