aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-04-02 11:57:06 -0400
committerDrew DeVault <sir@cmpwn.com>2018-04-02 11:57:06 -0400
commite3689dd5a93b4f4ae62637a2b81797335aafdcaf (patch)
treed2b9dd4816efdf861e71bcd1eff6a70928e59dc6
parentb2d871cfe215a82266d01847f4787bbcf8c721c9 (diff)
Fixes regarding @emersion's feedback
-rw-r--r--sway/commands/move.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sway/commands/move.c b/sway/commands/move.c
index 222ef314..ab959b77 100644
--- a/sway/commands/move.c
+++ b/sway/commands/move.c
@@ -106,7 +106,9 @@ static struct cmd_results *cmd_move_container(struct sway_container *current,
// We've never been to this output before
focus = destination->children->items[0];
}
+ struct sway_container *old_parent = current->parent;
container_move_to(current, focus);
+ sway_seat_set_focus(config->handler_context.seat, old_parent);
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
}
return cmd_results_new(CMD_INVALID, "move", expected_syntax);
@@ -149,7 +151,8 @@ struct cmd_results *cmd_move(int argc, char **argv) {
char *inv;
move_amt = (int)strtol(argv[1], &inv, 10);
if (*inv != '\0' && strcasecmp(inv, "px") != 0) {
- move_amt = 10;
+ return cmd_results_new(CMD_FAILURE, "move",
+ "Invalid distance specified");
}
}