diff --git a/README.md b/README.md index 72c7d07c..7327ad30 100644 --- a/README.md +++ b/README.md @@ -678,4 +678,4 @@ again. A [JSON Schema](https://json-schema.org/) of socket messages used to send instructions to `komorebi` can be generated with the `komorebic socket-schema` command. The output of this command can be redirected to the clipboard or a file, which can be used with services such as [Quicktype](https://app.quicktype.io/) to generate type definitions in different -programming languages. \ No newline at end of file +programming languages. diff --git a/komorebi/src/window_manager.rs b/komorebi/src/window_manager.rs index 5c2d738b..a4fc14dd 100644 --- a/komorebi/src/window_manager.rs +++ b/komorebi/src/window_manager.rs @@ -1047,8 +1047,10 @@ impl WindowManager { let origin_workspace = self.focused_workspace_for_monitor_idx_mut(origin_monitor_idx)?; - origin_workspace - .focus_container(origin_workspace.focused_container_idx() - 1); + if origin_workspace.focused_container_idx() != 0 { + origin_workspace + .focus_container(origin_workspace.focused_container_idx() - 1); + } } }