Skip to content

Commit

Permalink
fix(wm): handle stack commands when stack is monocled
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-ds13 committed Oct 21, 2024
1 parent 903b6af commit 48dce70
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions komorebi/src/window_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1870,7 +1870,12 @@ impl WindowManager {

tracing::info!("cycling container windows");

let container = self.focused_container_mut()?;
let container =
if let Some(container) = self.focused_workspace_mut()?.monocle_container_mut() {
container
} else {
self.focused_container_mut()?
};

let len = NonZeroUsize::new(container.windows().len())
.ok_or_else(|| anyhow!("there must be at least one window in a container"))?;
Expand All @@ -1894,7 +1899,12 @@ impl WindowManager {

tracing::info!("focusing container window at index {idx}");

let container = self.focused_container_mut()?;
let container =
if let Some(container) = self.focused_workspace_mut()?.monocle_container_mut() {
container
} else {
self.focused_container_mut()?
};

let len = NonZeroUsize::new(container.windows().len())
.ok_or_else(|| anyhow!("there must be at least one window in a container"))?;
Expand Down

0 comments on commit 48dce70

Please sign in to comment.