commit 799f285cd184cce209a6d9058652e825e266c7e8
parent 434cbaabf092ec1688b4dfd2d93f38e849531d96
Author: Ryan Dwyer <ryandwyer1@gmail.com>
Date: Wed, 17 Oct 2018 16:50:56 +1000
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.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git 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);