aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/move.c
diff options
context:
space:
mode:
authorRyan Dwyer <RyanDwyer@users.noreply.github.com>2018-05-12 17:52:51 +1000
committerGitHub <noreply@github.com>2018-05-12 17:52:51 +1000
commit4717c71da54a45f736bdfde04ee3f0db88918799 (patch)
treefa511907ae4ca82d8ca68cc3a2be254359af091f /sway/commands/move.c
parent935bda0f336bb9ca45a7fb96d7ed5f08ef04432f (diff)
parent2511adffc29996b64d01d85b3de31de9a2af9096 (diff)
Merge branch 'master' into fix-crash-on-fullscreen
Diffstat (limited to 'sway/commands/move.c')
-rw-r--r--sway/commands/move.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sway/commands/move.c b/sway/commands/move.c
index a5273ba4..890b1a8c 100644
--- a/sway/commands/move.c
+++ b/sway/commands/move.c
@@ -90,12 +90,14 @@ static struct cmd_results *cmd_move_container(struct sway_container *current,
}
free(ws_name);
struct sway_container *old_parent = current->parent;
- struct sway_container *focus = seat_get_focus_inactive(
+ struct sway_container *destination = seat_get_focus_inactive(
config->handler_context.seat, ws);
- container_move_to(current, focus);
- seat_set_focus(config->handler_context.seat, old_parent);
+ container_move_to(current, destination);
+ struct sway_container *focus = seat_get_focus_inactive(
+ config->handler_context.seat, old_parent);
+ seat_set_focus(config->handler_context.seat, focus);
container_reap_empty(old_parent);
- container_reap_empty(focus->parent);
+ container_reap_empty(destination->parent);
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
} else if (strcasecmp(argv[1], "to") == 0
&& strcasecmp(argv[2], "output") == 0) {