aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-05-11 07:34:14 -0400
committerGitHub <noreply@github.com>2018-05-11 07:34:14 -0400
commit2217518bd554d0f11dafa7ec4e8f35f2e4762fbd (patch)
treee541fb35656224109ec2d03275dce45afca0653f /sway
parent08fe619e7472f4784ccdbfd283beeb14d813334c (diff)
parent87fa84df131bd30251a789360e73b6fe8162d71f (diff)
Merge pull request #1956 from ggreer/move-focus
cmd_move_container: Focus a window on the source workspace.
Diffstat (limited to 'sway')
-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) {