aboutsummaryrefslogtreecommitdiff
path: root/sway/commands
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-04-07 11:19:25 -0400
committerGitHub <noreply@github.com>2018-04-07 11:19:25 -0400
commitf5a9bd5cb75b37376b98eadbff2facb7e0021d57 (patch)
treef72219a5a2adec3380da5269fee025715f7bf333 /sway/commands
parent2c9f0fb784f9781753679c8d1af3d8586c733f53 (diff)
parent93ca8919f63c7022779c9780a24478559e7e47af (diff)
downloadsway-f5a9bd5cb75b37376b98eadbff2facb7e0021d57.tar.xz
Merge pull request #1700 from swaywm/move-cmd-full
Implement move [left|right|up|down]
Diffstat (limited to 'sway/commands')
-rw-r--r--sway/commands/move.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/commands/move.c b/sway/commands/move.c
index c954ab94..15a5ebc4 100644
--- a/sway/commands/move.c
+++ b/sway/commands/move.c
@@ -82,6 +82,8 @@ static struct cmd_results *cmd_move_container(struct sway_container *current,
config->handler_context.seat, ws);
container_move_to(current, focus);
seat_set_focus(config->handler_context.seat, old_parent);
+ container_reap_empty(old_parent);
+ container_reap_empty(focus->parent);
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
} else if (strcasecmp(argv[1], "to") == 0
&& strcasecmp(argv[2], "output") == 0) {
@@ -109,6 +111,8 @@ static struct cmd_results *cmd_move_container(struct sway_container *current,
struct sway_container *old_parent = current->parent;
container_move_to(current, focus);
seat_set_focus(config->handler_context.seat, old_parent);
+ container_reap_empty(old_parent);
+ container_reap_empty(focus->parent);
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
}
return cmd_results_new(CMD_INVALID, "move", expected_syntax);