From 458cac9ce7a6233ae4e440540515bbc7b92d017e Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Wed, 29 May 2024 13:10:05 -0700 Subject: [PATCH] fix(cli): respect named ws send behaviour This commit ensures that the "send" behaviour is respected in named-workspace command variants such as send-to-named-workspace. --- komorebi/src/window_manager.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/komorebi/src/window_manager.rs b/komorebi/src/window_manager.rs index cef40c55..26a53bbe 100644 --- a/komorebi/src/window_manager.rs +++ b/komorebi/src/window_manager.rs @@ -1065,14 +1065,14 @@ impl WindowManager { target_monitor.add_container(container, workspace_idx)?; - if let Some(workspace_idx) = workspace_idx { - target_monitor.focus_workspace(workspace_idx)?; - } - - target_monitor.load_focused_workspace(mouse_follows_focus)?; - target_monitor.update_focused_workspace(offset)?; - if follow { + if let Some(workspace_idx) = workspace_idx { + target_monitor.focus_workspace(workspace_idx)?; + } + + target_monitor.load_focused_workspace(mouse_follows_focus)?; + target_monitor.update_focused_workspace(offset)?; + self.focus_monitor(monitor_idx)?; }