aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/move.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-10-17 16:50:56 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-10-17 16:57:32 +1000
commit799f285cd184cce209a6d9058652e825e266c7e8 (patch)
tree0a672a90b62fbce135ab695f7fdcfae13d255326 /sway/commands/move.c
parentMerge pull request #2843 from c-edw/feature/2842_TruncateMessage (diff)
downloadsway-799f285cd184cce209a6d9058652e825e266c7e8.tar.gz
sway-799f285cd184cce209a6d9058652e825e266c7e8.tar.zst
sway-799f285cd184cce209a6d9058652e825e266c7e8.zip
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) {
483 ws = workspace_create(NULL, ws_name); 483 ws = workspace_create(NULL, ws_name);
484 } 484 }
485 free(ws_name); 485 free(ws_name);
486 destination = seat_get_focus_inactive(seat, &ws->node); 486 struct sway_container *dst = seat_get_focus_inactive_tiling(seat, ws);
487 destination = dst ? &dst->node : &ws->node;
487 } else if (strcasecmp(argv[1], "output") == 0) { 488 } else if (strcasecmp(argv[1], "output") == 0) {
488 struct sway_output *new_output = output_in_direction(argv[2], 489 struct sway_output *new_output = output_in_direction(argv[2],
489 old_output, container->x, container->y); 490 old_output, container->x, container->y);