feat(wm): allow stack expansion in direction

This commit allows for the user to expand container stacks while focused
on an an existing (len > 1) container stack by using the stack command
with a desired direction.

resolve #847
This commit is contained in:
LGUG2Z
2024-05-25 20:34:57 -07:00
parent 5cff90a62b
commit cfb0c7f2ce

View File

@@ -1503,7 +1503,15 @@ impl WindowManager {
new_idx
};
workspace.move_window_to_container(adjusted_new_index)?;
if let Some(current) = workspace.focused_container() {
if current.windows().len() > 1 {
workspace.focus_container(adjusted_new_index);
workspace.move_window_to_container(current_container_idx)?;
} else {
workspace.move_window_to_container(adjusted_new_index)?;
}
}
self.update_focused_workspace(self.mouse_follows_focus, false)?;
}