diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-12-24 18:00:46 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-12-24 18:00:46 +0400 |
| commit | 489a225fae57adba01057893d244c64c749bccfe (patch) | |
| tree | 0afc05b4f4552142e24dccbc905c36753f314f85 /src/layout/mod.rs | |
| parent | 85cb4b42f6f0f1b445957381f8ec65571ece2ad5 (diff) | |
| download | niri-489a225fae57adba01057893d244c64c749bccfe.tar.gz niri-489a225fae57adba01057893d244c64c749bccfe.tar.bz2 niri-489a225fae57adba01057893d244c64c749bccfe.zip | |
Add and use remove_window_by_idx
Diffstat (limited to 'src/layout/mod.rs')
| -rw-r--r-- | src/layout/mod.rs | 3 |
1 files changed, 1 insertions, 2 deletions
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<W: LayoutElement> Layout<W> { 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); |
