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.
This commit is contained in:
LGUG2Z
2024-05-29 13:10:05 -07:00
parent 6c90001c00
commit 270374497c

View File

@@ -1037,6 +1037,14 @@ impl WindowManager {
tracing::info!("moving container");
let focused_monitor_idx = self.focused_monitor_idx();
if focused_monitor_idx == monitor_idx {
if let Some(workspace_idx) = workspace_idx {
return self.move_container_to_workspace(workspace_idx, follow);
}
}
let offset = self.work_area_offset;
let mouse_follows_focus = self.mouse_follows_focus;
@@ -1072,6 +1080,11 @@ impl WindowManager {
target_monitor.load_focused_workspace(mouse_follows_focus)?;
target_monitor.update_focused_workspace(offset)?;
// this second one is for DPI changes when the target is another monitor
// if we don't do this the layout on the other monitor could look funny
// until it is interacted with again
target_monitor.update_focused_workspace(offset)?;
if follow {
self.focus_monitor(monitor_idx)?;
}