From 799f285cd184cce209a6d9058652e825e266c7e8 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Wed, 17 Oct 2018 16:50:56 +1000 Subject: Fix moving tiled containers to workspaces which only have floating views * Make a workspace which only contains floating views * Switch to another workspace and create a tiled view * Move the tiled view to the workspace with `move container to workspace N` The container would be added as a sibling to the floating view, which makes the container floating while having the geometry of a tiled container. This changes it so it only looks for tiled containers in the workspace with a fallback to the workspace itself. --- sway/commands/move.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sway/commands/move.c') diff --git a/sway/commands/move.c b/sway/commands/move.c index 24036f36..cb7f6009 100644 --- a/sway/commands/move.c +++ b/sway/commands/move.c @@ -483,7 +483,8 @@ static struct cmd_results *cmd_move_container(int argc, char **argv) { ws = workspace_create(NULL, ws_name); } free(ws_name); - destination = seat_get_focus_inactive(seat, &ws->node); + struct sway_container *dst = seat_get_focus_inactive_tiling(seat, ws); + destination = dst ? &dst->node : &ws->node; } else if (strcasecmp(argv[1], "output") == 0) { struct sway_output *new_output = output_in_direction(argv[2], old_output, container->x, container->y); -- cgit v1.2.3-54-g00ecf