aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/move.c
diff options
context:
space:
mode:
authorRyan Dwyer <ryandwyer1@gmail.com>2018-10-17 16:50:56 +1000
committerRyan Dwyer <ryandwyer1@gmail.com>2018-10-17 16:57:32 +1000
commit799f285cd184cce209a6d9058652e825e266c7e8 (patch)
tree0a672a90b62fbce135ab695f7fdcfae13d255326 /sway/commands/move.c
parent434cbaabf092ec1688b4dfd2d93f38e849531d96 (diff)
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 (limited to 'sway/commands/move.c')
-rw-r--r--sway/commands/move.c3
1 files changed, 2 insertions, 1 deletions
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);