diff options
-rw-r--r-- | sway/commands/move.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/commands/move.c b/sway/commands/move.c index 4306aac8..926b2e8e 100644 --- a/sway/commands/move.c +++ b/sway/commands/move.c | |||
@@ -473,7 +473,7 @@ static struct cmd_results *cmd_move_container(int argc, char **argv) { | |||
473 | // We have to create the workspace, but if the container is | 473 | // We have to create the workspace, but if the container is |
474 | // sticky and the workspace is going to be created on the same | 474 | // sticky and the workspace is going to be created on the same |
475 | // output, we'll bail out first. | 475 | // output, we'll bail out first. |
476 | if (container->is_sticky) { | 476 | if (container->is_sticky && container_is_floating_or_child(container)) { |
477 | struct sway_output *new_output = | 477 | struct sway_output *new_output = |
478 | workspace_get_initial_output(ws_name); | 478 | workspace_get_initial_output(ws_name); |
479 | if (old_output == new_output) { | 479 | if (old_output == new_output) { |
@@ -507,8 +507,8 @@ static struct cmd_results *cmd_move_container(int argc, char **argv) { | |||
507 | return cmd_results_new(CMD_INVALID, expected_syntax); | 507 | return cmd_results_new(CMD_INVALID, expected_syntax); |
508 | } | 508 | } |
509 | 509 | ||
510 | if (container->is_sticky && old_output && | 510 | if (container->is_sticky && container_is_floating_or_child(container) && |
511 | node_has_ancestor(destination, &old_output->node)) { | 511 | old_output && node_has_ancestor(destination, &old_output->node)) { |
512 | return cmd_results_new(CMD_FAILURE, "Can't move sticky " | 512 | return cmd_results_new(CMD_FAILURE, "Can't move sticky " |
513 | "container to another workspace on the same output"); | 513 | "container to another workspace on the same output"); |
514 | } | 514 | } |